Problems with Windows threads and cygwin sleep()
Pavel Tsekov
ptsekov@gmx.net
Thu Aug 25 12:39:00 GMT 2005
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/
More information about the Cygwin
mailing list