From owner-freebsd-stable@FreeBSD.ORG Mon May 9 19:54:35 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 A06D016A4EB for ; Mon, 9 May 2005 19:54:35 +0000 (GMT) Received: from mail.ntplx.net (mail.ntplx.net [204.213.176.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1EA4A43D7D for ; Mon, 9 May 2005 19:54:33 +0000 (GMT) (envelope-from deischen@freebsd.org) Received: from sea.ntplx.net (sea.ntplx.net [204.213.176.11]) j49JsWQF003161; Mon, 9 May 2005 15:54:32 -0400 (EDT) Date: Mon, 9 May 2005 15:54:32 -0400 (EDT) From: Daniel Eischen X-X-Sender: eischen@sea.ntplx.net To: Peter Jeremy In-Reply-To: <20050509194341.GA226@cirb503493.alcatel.com.au> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by AMaViS and Clam AntiVirus (mail.ntplx.net) cc: Ewan Todd cc: freebsd-stable Subject: Re: Performance issue X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Daniel Eischen 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 19:54:35 -0000 On Tue, 10 May 2005, Peter Jeremy wrote: > On Mon, 2005-May-09 11:00:18 -0400, Ewan Todd wrote: > >I have what I think is a serious performance issue with fbsd 5.3 > >release. I've read about threading issues, and it seems to me that > >that is what I'm looking at, but I'm not confident enough to rule out > >that it might be a hardware issue, a kernel configuration issue, or > >something to do with the python port. > > There does appear to be a problem in FreeBSD. Python is built with > threading enabled by default, the threading libraries play with the > signal mask and there have been extensive changes there. My The threading libraries don't play with the signal mask. In fact, libpthread has userland versions of sigprocmask() et. al. and won't even make the syscall() unless the threads are system scope. There is a special thread in libpthread that handles signals which does use the system sigprocmask(), but unless the application is making heavy use of signals in general, it shouldn't matter. > suggestions on things you could check are: > 1) Rebuild python with threading disabled (add '-DWITHOUT_THREADS' to the > 'make' command line and see if that makes any difference > 2) Re-write the sample program in a non-threaded language - eg C or perl > and see if the high system time goes away. > > Unfortunately, I can't think of a solution at present. You can also set LIBPTHREAD_SYSTEM_SCOPE in the environment to force libpthread to use system scope threads. It uses process scope threads by default. -- DE