From owner-freebsd-stable@FreeBSD.ORG Mon May 9 18:22:47 2005 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CAC7C16A4EA for ; Mon, 9 May 2005 18:22:47 +0000 (GMT) Received: from sp.dominia.org (efnet-math.org [69.60.109.125]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9B7D043D76 for ; Mon, 9 May 2005 18:22:46 +0000 (GMT) (envelope-from ssouhlal@FreeBSD.org) Received: from [192.168.1.12] (63-170-138-118.cst-sg.blacksburg.ntc-com.net [63.170.138.118]) (authenticated bits=0) by sp.dominia.org (8.13.1/8.13.1) with ESMTP id j49IMgS6013298 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NO); Mon, 9 May 2005 14:22:43 -0400 In-Reply-To: References: Mime-Version: 1.0 (Apple Message framework v728) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <2B4490FF-FEFD-473F-BDF0-293C468A55B9@FreeBSD.org> Content-Transfer-Encoding: 7bit From: Suleiman Souhlal Date: Mon, 9 May 2005 14:22:36 -0400 To: Pete French X-Mailer: Apple Mail (2.728) cc: ewan@mathcode.net cc: freebsd-stable@FreeBSD.org Subject: Re: Performance issue X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 May 2005 18:22:47 -0000 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@vt.edu The FreeBSD Project | ssouhlal@FreeBSD.org