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 X-Authenticated: #14308112 Date: Thu, 25 Aug 2005 15:40:11 +0300 From: Pavel Tsekov X-X-Sender: ptsekov AT mordor To: cygwin AT cygwin DOT com Subject: Re: Problems with Windows threads and cygwin sleep() In-Reply-To: <20050825120922.GQ17452@calimero.vinschen.de> Message-ID: References: <20050824185143 DOT 76C69A01 AT data DOT zone DOT ee> <430D688D DOT 1070205 AT vihmapuu DOT ee> <430D8FC8 DOT 8090906 AT vihmapuu DOT ee> <20050825100234 DOT GL17452 AT calimero DOT vinschen DOT de> <430DA017 DOT 5000402 AT vihmapuu DOT ee> <20050825115019 DOT GP17452 AT calimero DOT vinschen DOT de> <20050825120922 DOT GQ17452 AT calimero DOT vinschen DOT de> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Y-GMX-Trusted: 0 X-IsSubscribed: yes Hello, On Thu, 25 Aug 2005, Corinna Vinschen wrote: > > Here when the app is compiled with -mno-cygwin it takes 100% cpu when it > > allocates 400+ threads - both from Windows Command Prompt and Cygwin bash. > > After all the testcase consist almost entirely of Win32 calls. > > You're on W2K, I'm on XP, maybe there's a difference? I can easily > reproduce nearly 0% CPU with 1000 threads if no Cygwin process is > present and nearly 99% if a Cygwin process is present. > > Even if we can't do much about it, it would be interesting to find out > how Cygwin affects CPU usage of non-Cygwin processes. Stopping all Cygwin dependent programs helps here too - the program runs fine. I forgot sshd, cygserver and inetd. I did some further testing - here are the results: 1) Bash in Cygwin console CPU usage is ok 2) Bash in rxvt (W11) CPU usage 99 % 3) inetd started as service with no clients connected CPU usage is ok When a client is connected CPU goes 99% 4) sshd started as service (doesn't matter if there are connected clients) CPU usage 99 % The tests were performed with no other Cygwin programs running and threads.exe running in command prompt. Each time I would stop all involved programs and start them again. Perhaps ptys are involved ?! -- 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/