2016-04-17 18:23 GMT+02:00 Simon Slavin <slavins at bigfraud.org>:

>
> On 17 Apr 2016, at 5:13pm, Cecil Westerhof <cldwesterhof at gmail.com> wrote:
>
> > Or is this normal
> > in Java programs?
>
> Yes.  You're discovering that Java is rubbish.  'futex' for Java is what
> most environments call 'mutex' and Java doesn't do locking well.  It's this
> which is causing your delays, not SQLite or anything around it.
>
> Google 'java futex' if you want details, but there's little point since
> you can't do much about it.  Just stay updated to the latest OS and the
> latest Java available to you and hope someone figured it out.
>

?I put a strace on it. This was what I got:
Process 26455 attached with 20 threads
% time     seconds  usecs/call     calls    errors syscall
------ ----------- ----------- --------- --------- ----------------
 99.80 11245.498406       42527    264435    130887 futex
  0.09   10.480000     3493333         3           fsync
  0.08    8.886784           0  39275508           read
  0.02    2.552284           0  16397440           write
  0.00    0.367716           0  50708676           lseek
  0.00    0.048000        8000         6         6 restart_syscall
  0.00    0.000442           1       737           sched_yield
  0.00    0.000000           0         2           close
  0.00    0.000000           0         1           stat
  0.00    0.000000           0         4           fstat
  0.00    0.000000           0         4           mmap
  0.00    0.000000           0       128           mprotect
  0.00    0.000000           0         6           rt_sigprocmask
  0.00    0.000000           0         1           rt_sigreturn
  0.00    0.000000           0         2         2 access
  0.00    0.000000           0         4           madvise
  0.00    0.000000           0         7           fcntl
  0.00    0.000000           0         3           unlink
  0.00    0.000000           0         1           gettid
  0.00    0.000000           0         2           sched_getaffinity
------ ----------- ----------- --------- --------- ----------------
100.00 11267.833632             106646970    130895 total
?

?Pretty damaging for futex: almost half of the calls went wrong and 99.8%
of the time is spend there?.

?I have some finding out to do.?


-- 
Cecil Westerhof

Reply via email to