public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Cygwin slow on x64 systems
@ 2010-01-23 22:32 David Morgan
  2010-01-24  2:22 ` Vincent Richomme
  0 siblings, 1 reply; 43+ messages in thread
From: David Morgan @ 2010-01-23 22:32 UTC (permalink / raw)
  To: cygwin; +Cc: mlm

Hello all,

	We use cygwin for our build environment, and have observed that 
everything runs extremely slow on x64 systems, for versions newer than
approximately 1.5.12 (including 1.7.1).  When I run the following command
in BASH,

while true; do date >> file; done

on a 1.5.12 Core II system, I get approximately 100 dates per second.  
On a 1.7.1 Nehalem system, I get approximately 15, and it takes several
seconds for Ctrl-C to take effect, whereas it's instantaneous on 1.5.12.
It makes no difference whether I redirect the output or not.

We have found that the problem was introduced somewhere between 1.5.12 
and 1.5.24-2.   We have not seen any such slowdown on x86 systems.
We have observed this on XP x64, Server 2003 R2 x64, and now (with 1.7.1
only) on Windows 7 x64.

Can anyone recommend how we could profile this to help isolate the problem?
We have vTune and Quantify in-house.

Regards,

David


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 43+ messages in thread
* Cygwin slow on x64 systems
@ 2010-08-30 11:23 Sagi Ben-Akiva
  2010-08-30 14:26 ` Edward Lam
                   ` (3 more replies)
  0 siblings, 4 replies; 43+ messages in thread
From: Sagi Ben-Akiva @ 2010-08-30 11:23 UTC (permalink / raw)
  To: cygwin

Hello,

For the last couple of weeks I'm trying to identify the cause for cygwin 
slowdown on x64 machines which was reported by David Morgan about 6 
months ago.

I wrote a little bash script which prints the result of 'date -s' to a 
file in a loop and then counts the number of times the same second 
appears in that file.
I used this script to test all available cygwin revisions snapshots 
(which I downloaded from 
ftp://www.fruitbat.org/pub/cygwin/circa/index.html) for cygwin version 
1.5.19-4.
I was able to identify the exact change which introduce the slowdown.

With my test script for cygwin version 1.5.19-4, snapshot timestamp 
1142005204 I'm able to get ~40 lines/second, but with the same version, 
snapshot timestamp 1142338816 the result is ~18 lines/second.

Using cvsps I was able to generate a patchset which contains all the 
changes between those 2 revisions.
I then applied the changes one by one and built cygwin1.dll for each 
change, then I ran my test script again for each cygwin1.dll version and 
I found that the change to winsup/cygwin/dcrt0.cc from '2006/03/12 
23:57:03' introduce this issue.

The log for this change is :

* dcrt0.cc (dll_crt0_0): Call sigproc_init during init startup.
(_dll_crt0): Don't worry about sync_startup.  Just wait for sigthread here.

This change includes 2 different sub-changes :
1. Moving the call to sigproc_init from dll_crt0_1 function to 
dll_crt0_0 - which doesn't affect performance.

2. a. Moving the call to wait_for_sigthread from dll_crt0_1 to _dll_crt0 
which calls dll_crt0_1.
    b. Deleting the call to WaitForSingleObject,
       i.e. : "Don't worry about sync_startup"

I can confirm that the 2nd sub-change is the cause for the slowdown.

Any help will be appreciated.

Thank you,
   Sagi.

-- 

Sagi Ben-Akiva - sagi at graphtech dot co dot il
GraphTech Computer Systems




--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 43+ messages in thread
* Re: Cygwin slow on x64 systems
@ 2010-08-31  7:18 Roland Schwingel
  2010-08-31 14:19 ` Christopher Faylor
  0 siblings, 1 reply; 43+ messages in thread
From: Roland Schwingel @ 2010-08-31  7:18 UTC (permalink / raw)
  To: cygwin

Hi Sagi and all others,

Thanks Sagi for your investigation!

This is great news that it could finally be tracked down. I am also 
suffering badly here from this
speed drop. I haven't yet tried myself to revert this change to see 
whether it brings back speed
but will certainly try to do so soon.

What are our cygwin gurus (CGF,Corinna,?) saying about this? Can the 
results of these
investigations be incorporated in a change in an upcoming version to get 
a more performant
cygwin version? I know that in 1.7 codebase a lot has changed so it 
might not be that easy
to transport these results to the current version.

Beside of the fork problems the speed drop is (in my eyes) the other big 
problem of cygwin on x64.

Thanks in advance,

Roland, hoping that this problem gets cured soon



--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 43+ messages in thread

end of thread, other threads:[~2010-09-26 18:10 UTC | newest]

Thread overview: 43+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-01-23 22:32 Cygwin slow on x64 systems David Morgan
2010-01-24  2:22 ` Vincent Richomme
2010-04-25  2:41   ` StephenBartlett
2010-04-30  2:37     ` greenup greenup
2010-04-30  3:06       ` NightStrike
2010-04-30 13:58         ` Edward Lam
2010-04-30 15:24           ` Christopher Faylor
2010-08-30 11:23 Sagi Ben-Akiva
2010-08-30 14:26 ` Edward Lam
2010-08-30 16:53 ` Edward Lam
2010-08-31 13:04   ` Sagi Ben-Akiva
2010-08-31 21:36 ` Magnus Holmgren
2010-09-01 17:12   ` Magnus Holmgren
2010-09-01 17:15     ` Eric Blake
2010-09-01 17:27       ` Magnus Holmgren
2010-09-01 17:30         ` Eric Blake
2010-09-01 18:31           ` Daniel Colascione
2010-09-06 11:32         ` Sagi Ben-Akiva
2010-09-06 17:36           ` Christopher Faylor
2010-09-06 17:51             ` Sagi Ben-Akiva
2010-09-01 18:37     ` Christopher Faylor
2010-09-01 19:00     ` Edward Lam
2010-09-01 19:10 ` Christopher Faylor
2010-09-01 20:19   ` Heath Kehoe
2010-09-01 21:21     ` Christopher Faylor
2010-09-02  3:28       ` Yaakov (Cygwin/X)
2010-09-02  5:11         ` Christopher Faylor
2010-09-07  6:12           ` Christopher Faylor
2010-09-07  7:42             ` Christopher Faylor
2010-09-08 15:13             ` Christopher Faylor
2010-09-20  8:55               ` Christopher Faylor
2010-09-20  9:40                 ` Yaakov (Cygwin/X)
2010-09-20  9:41                   ` Christopher Faylor
2010-09-26 17:38                     ` Yaakov (Cygwin/X)
2010-09-26 18:10                       ` Christopher Faylor
2010-09-27  1:19                         ` Yaakov (Cygwin/X)
2010-09-27  1:36                           ` Christopher Faylor
2010-08-31  7:18 Roland Schwingel
2010-08-31 14:19 ` Christopher Faylor
2010-08-31 15:12   ` Edward Lam
2010-08-31 16:48     ` Christopher Faylor
2010-08-31 17:41   ` Magnus Holmgren
2010-08-31 19:23     ` Christopher Faylor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).