Re: Increasing row retrieving speed via net8

  • From: GG <grzegorzof@xxxxxxxxxx>
  • To: Timur Akhmadeev <Akhmadeev@xxxxxxxxxxxxxx>
  • Date: Wed, 18 Apr 2012 18:35:48 +0200

W dniu 2012-04-18 11:30, Timur Akhmadeev pisze:
> Hi
>
> Why do you think futex calls are your problem? JVM is multi-threaded by 
> default and threads do use different system calls during their life. Doesn't 
> mean your particular Net issue has anything to do with futex calls, which 
> are, as far as I know, ~idle work.
>
Hi,
if I remember correctly pmdtm is not java aps but it uses threads, I saw 
nine when using 1 data fetch stream .
Getting back to futex , as You've said its not about futex 'as is' but 
rather number of calls to futex .
I've got sample strace taken in ~ 10 sec interval for both bad and good 
performing fetch ( select * from table )

  cat 1t_bad.txt   1t_8M_buffer.out
% time     seconds  usecs/call     calls    errors syscall
------ ----------- ----------- --------- --------- ----------------
  57.35    1.738975         161     10819      2145 futex
  41.35    1.253799       32149        39           poll
   1.21    0.036717           3     11869           read
   0.08    0.002491           1      2163           write
   0.00    0.000000           0        50           fcntl
   0.00    0.000000           0        19           clock_gettime
------ ----------- ----------- --------- --------- ----------------
100.00    3.031982                 24959      2145 total


% time     seconds  usecs/call     calls    errors syscall
------ ----------- ----------- --------- --------- ----------------
  61.90    0.754143        3969       190        24 futex
  37.27    0.454022       14188        32           poll
   0.82    0.010002           1     11062           read
   0.01    0.000070           2        31           write
   0.00    0.000000           0        50           fcntl
   0.00    0.000000           0        14           clock_gettime
------ ----------- ----------- --------- --------- ----------------
100.00    1.218237                 11379        24 total



So for small buffer 120kB I think (was able to fetch 30k rows per sec)  
it was like
10819     futex calls and 2145 errors related

and with 8MB buffer (was able to fetch 105k rows per sec) it was like:
190  futex calls      24 errors

So instead of 'futexing' threads was doing read from socket descriptor 
to 8M application buffer :).
BTW that buffer size is directly related to fetch size (r=_FETCH_SIZE_ 
in 10046 fetch call) set by client connection .
Hope that helps .
Regards
GregG





--
//www.freelists.org/webpage/oracle-l


Other related posts: