2016-04-18 4:04 GMT+02:00 Rowan Worth <rowanw at dugeo.com>:

> On 18 April 2016 at 06:55, Cecil Westerhof <cldwesterhof at gmail.com> wrote:
>
> > ?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
> > ------ ----------- ----------- --------- --------- ----------------
> > 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.?
>
>
> I'm not sure this is damning for futex. You said you are not creating
> threads yourself, which means you probably only have one I/O bound thread
> actually doing anything. The other 19 threads are presumably spawned by the
> APIs you are using and are likely just waiting for something to do. jstack
> <PID> will give you details on each thread in the JVM so you can see what
> they are up to.
>
> It's not like the futex calls are wasting CPU (in this case) - the threads
> are idle until the kernel wakes them up.
>

?99.8 percent of the time is spend on futex. That seems a tad much.

-- 
Cecil Westerhof

Reply via email to