Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Date: Sat, 28 May 2005 20:18:46 -0400 From: Christopher Faylor To: cygwin AT cygwin DOT com Subject: Re: Serious performance problems (Gerrit/Danny please comment) Message-ID: <20050529001846.GG3094@trixie.casa.cgf.cx> Reply-To: cygwin AT cygwin DOT com References: <000b01c563c7$f4456f00$976d65da AT DANNY> <4298F195 DOT 9090600 AT familiehaase DOT de> <20050529000152 DOT GE3094 AT trixie DOT casa DOT cgf DOT cx> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050529000152.GE3094@trixie.casa.cgf.cx> User-Agent: Mutt/1.5.8i On Sat, May 28, 2005 at 08:01:52PM -0400, Christopher Faylor wrote: >cygspd runs in 25 - 26 seconds. cygspd-mingw runs in 2 seconds. If I >create dummy versions of pthread_{getspecific,setspecific,mutex_lock,mutex_unlock} >then the cygwin version is about a second slower than the mingw version. Some more data points: Unless I screwed up something in the above example, pthread_setspecific is called 23,360,006 times in the test case. pthread_getspecific is called 46,720,011 times. The cygwin signal handling code adds a 16.1 microsecond penalty (on my system) for functions it thinks are not interruptible (most functions in cygwin fall into this category). I'm a little tired right now so maybe I've got the numbers wrong, but it seems like just the cygwin signal handling penalty is enough to account for the discrepancy -- which is pretty much what I expected. I have an idea about how to work around this problem but I have to think about how dangerous it might be. Basically removing the signal handling wrapper around pthread_getspecific and pthread_setspecific. That may work ok but I have to think about worst case scenarios. cgf -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/