Why is MySQL nearly twice as fast on Linux?

Petri Helenius pete at he.iki.fi
Sun May 23 13:11:48 PDT 2004


Julian Elischer wrote:

>you might also lile to run a profiled app and a profiled kernel
>and use gprof and kgmon to get results.
>
>  
>
I think profiling the application would be more useful. Is there a 
counter for syscalls per process? I know there is a context switch counter.

>There is obviously a bottleneck, but it's very hard to tell what it is..
>My guess is that the scheduler(s) are not doing a very good job. and the
>fact that GIANT is not removed from the kernel yet says that generally
>syscalls will be a bottleneck.
>
>  
>
While watching the top output, I saw a "logjam" to appear from time to 
time where all processes/threads were waiting for Giant. However I don´t 
feel that causes the large impact, it might contribute 10-20% but it 
does not feel frequent enough to cause 50% difference.

>ULE should be able to do a better job at scheduling with
>multiple CPUs but it is a work in progress. If threads all hit a GIANT 
>based logjam, there is not a lot the scheduler can do about it..
>
>  
>
I find it hard to believe that the threading stuff would be seriously 
broken since we do large processing with libkse and don´t have issues 
with the performance. However I´m observing about 50000 context switches 
but only 5000 syscalls a second. (I know it´s a different application 
but also for 1500 queries a second 70000 syscalls sounds excessive).

Pete



More information about the freebsd-threads mailing list