Performance issue

Suleiman Souhlal ssouhlal at FreeBSD.org
Mon May 9 11:22:47 PDT 2005


Hello,

On May 9, 2005, at 1:31 PM, Pete French wrote:

>> 5.3 ships with SMP turned on, which makes lock operations rather
>> expensive on single-processor machines.  4.x does not have SMP
>> turned on by default.  Would you be able to re-run your test with
>> SMP turned off?
>>
>
> I just ran a test here with SMP turned of on 5.4-RC4 (GENERIC) I  
> got the
> following result:
>
>        67.52 real        41.13 user        26.16 sys
>       7034  involuntary context switches
>
> i.e. it still has system time a a huge proportion of the total  
> compared
> to the 4.11 kernel. Interesingly, after reading Holger Kipp's results
> I tried it on a genuine multi-processor box with SMP enabled  
> running 5.3.
> He got a very small percentage of the time in sys (3.51 out of  
> 81.90) but
> I got:
>       255.30 real       160.20 user        88.50 sys
>
> Once again a far higher proprtion of the time spent in sys than you  
> would
> expect.

I ran ktrace(1) on it, and it appears that python keeps calling  
sigprocmask() continually:

    673 python   0.000007 CALL  sigprocmask(0x3,0,0x811d11c)
    673 python   0.000005 RET   sigprocmask 0
    673 python   0.000009 CALL  sigprocmask(0x1,0,0x8113d1c)
    673 python   0.000005 RET   sigprocmask 0
etc..

This explains why it's using so much system time. Now the question is  
why is python doing this?

--
Suleiman Souhlal     | ssouhlal at vt.edu
The FreeBSD Project  | ssouhlal at FreeBSD.org



More information about the freebsd-stable mailing list