delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/05/28/20:18:56

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
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 <cgf-no-personal-reply-please AT cygwin DOT com>
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
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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019