public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Cygwin speed difference on multiple cores -vs- single-core?
@ 2010-08-14  0:40 Andy Nicholas
  2010-08-14  1:05 ` Tim Prince
  2010-08-14  1:24 ` mike marchywka
  0 siblings, 2 replies; 5+ messages in thread
From: Andy Nicholas @ 2010-08-14  0:40 UTC (permalink / raw)
  To: cygwin

Hi Folks,

When using cygwin, I've noticed that there seems to be a large speed 
difference when I boot my windows 7 (32-bit) machine in single-core mode 
versus the regular number of cores (4, Core i7-930).

I've read through the FAQ and didn't notice anything about this issue.

Normally, I would expect nearly no speed difference based on the Windows 
environment... but after some extensive timing tests it seems like the single-
core machine is usually at least 2x faster than using the same machine setup 
in multi-core mode. I limit the number of cores using MSCONFIG, advanced boot 
options.

We have some simple script and more complex scripts which show this behavior. 
The simple scripts do straightforward things like "rm -rf" over some directory 
trees. Even the simple scripts run slowly when the PC is booted with multiple 
cores.

Is this known behavior? Is there some way to work around it so I can boot my 
PC, use all the cores with other apps, and continue run cygwin 2x faster?

Thanks much,

andy



--
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] 5+ messages in thread

* Re: Cygwin speed difference on multiple cores -vs- single-core?
  2010-08-14  0:40 Cygwin speed difference on multiple cores -vs- single-core? Andy Nicholas
@ 2010-08-14  1:05 ` Tim Prince
  2010-08-14  2:06   ` Andy Nicholas
  2010-08-14  1:24 ` mike marchywka
  1 sibling, 1 reply; 5+ messages in thread
From: Tim Prince @ 2010-08-14  1:05 UTC (permalink / raw)
  To: cygwin

On 8/13/2010 5:37 PM, Andy Nicholas wrote:
> Hi Folks,
>
> When using cygwin, I've noticed that there seems to be a large speed
> difference when I boot my windows 7 (32-bit) machine in single-core mode
> versus the regular number of cores (4, Core i7-930).
>
> I've read through the FAQ and didn't notice anything about this issue.
>
> Normally, I would expect nearly no speed difference based on the Windows
> environment... but after some extensive timing tests it seems like the single-
> core machine is usually at least 2x faster than using the same machine setup
> in multi-core mode. I limit the number of cores using MSCONFIG, advanced boot
> options.
>
> We have some simple script and more complex scripts which show this behavior.
> The simple scripts do straightforward things like "rm -rf" over some directory
> trees. Even the simple scripts run slowly when the PC is booted with multiple
> cores.
>
> Is this known behavior? Is there some way to work around it so I can boot my
> PC, use all the cores with other apps, and continue run cygwin 2x faster?
>
>    

Several possibilities which you haven't addressed may affect this.
Are you comparing the performance of a single thread when locked to a 
single core, compared to when it is permitted to rotate among cores, 
with or without HyperThread enabled?
I've never run into anyone running win7 32-bit; it may have more such 
issues than the more common 64-bit.

-- 
Tim Prince


--
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] 5+ messages in thread

* Re: Cygwin speed difference on multiple cores -vs- single-core?
  2010-08-14  0:40 Cygwin speed difference on multiple cores -vs- single-core? Andy Nicholas
  2010-08-14  1:05 ` Tim Prince
@ 2010-08-14  1:24 ` mike marchywka
  1 sibling, 0 replies; 5+ messages in thread
From: mike marchywka @ 2010-08-14  1:24 UTC (permalink / raw)
  To: cygwin

On 8/13/10, Andy Nicholas <> wrote:
> Hi Folks,
>
> When using cygwin, I've noticed that there seems to be a large speed
> difference when I boot my windows 7 (32-bit) machine in single-core mode
> versus the regular number of cores (4, Core i7-930).
>
> I've read through the FAQ and didn't notice anything about this issue.
>
> Normally, I would expect nearly no speed difference based on the Windows
> environment... but after some extensive timing tests it seems like the
> single-
> core machine is usually at least 2x faster than using the same machine setup
> in multi-core mode. I limit the number of cores using MSCONFIG, advanced
> boot
> options.
>
> We have some simple script and more complex scripts which show this
> behavior.
> The simple scripts do straightforward things like "rm -rf" over some
> directory
> trees. Even the simple scripts run slowly when the PC is booted with
> multiple
> cores.
>
> Is this known behavior? Is there some way to work around it so I can boot my
> PC, use all the cores with other apps, and continue run cygwin 2x faster?
>
> Thanks much,
>
> andy
>
>

You want to look at details before concluding anything but if it is
real and you blame memory thrashing, I'd be curious to know about it.
This is hardly cygwin specific but people here may be interested.
Usually memory bottleneck kills you first and more processors can just
thrash. At least take a look at task manager and get some idea what
may be going on. Off hand it sounds like it may have more to do with
the file system details based on test you mention. Disk IO and
buffering and syncing can be an issue I would guess.

http://archives.free.net.ph/message/20081115.133519.47f76485.el.html


http://spectrum.ieee.org/computing/hardware/multicore-is-bad-news-for-supercomputers

--
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] 5+ messages in thread

* Re: Cygwin speed difference on multiple cores -vs- single-core?
  2010-08-14  1:05 ` Tim Prince
@ 2010-08-14  2:06   ` Andy Nicholas
  2010-08-14 11:44     ` mike marchywka
  0 siblings, 1 reply; 5+ messages in thread
From: Andy Nicholas @ 2010-08-14  2:06 UTC (permalink / raw)
  To: cygwin

Tim Prince <n8tm <at> aol.com> writes:

> Several possibilities which you haven't addressed may affect this.
> Are you comparing the performance of a single thread when locked to a 
> single core, compared to when it is permitted to rotate among cores, 
> with or without HyperThread enabled?
> I've never run into anyone running win7 32-bit; it may have more such 
> issues than the more common 64-bit.

The scripts we're using form the basis of a build system to invoke GCC and an 
assembler lots of times throughout a directory tree of a few thousand items. 
The tree itself on the file-system is not gigantic. I've tried to make sure 
that the environment has all the usual suspects disabled (virus-checking 
disabled, paging completely disabled for all disks, nothing else running in 
the background) before comparing anything.

I've been comparing using 2 different methods, one is the time to clean the 
tree using "rm -rf" via a makefile on empty directories and the other is to do 
a full build on a clean tree. When running make we don't use the "-j" option 
to use multi-threaded builds. When running each testing method, the CPUs are 
barely loaded at all (10%, maybe) and there's almost no I/O that registers.

Hyperthreading is disabled. I've tried comparisons when configuring the PC 
using msconfig to present 1 core, 2 cores, and 4 cores. The difference between 
1-core and 2 or 4 cores is dramatic with 1-core running 2x+ faster. There's 
almost no difference in speed between 2 cores and 4 cores. The disk is an SSD.

I've recently tried launching the original command-line window with its 
affinity locked to core0 and priority set to "realtime". I've inspected the 
results using SysInternals' Process Explorer and spawned processes appear to 
be locked to core0. I made sure that the non-spawned processes 
like "conhost.exe" also had their affinities set and their priority raised to 
realtime. There's no difference in processing speed though.

Btw, I don't think the issue is I/O. The disk I'm using is an SSD (OCZ Vertex 
2) which is fairly fast. But, the results repeat even if I try a regular 7200 
RPM hard drive.

Yeah, weird.

andy






--
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] 5+ messages in thread

* Re: Cygwin speed difference on multiple cores -vs- single-core?
  2010-08-14  2:06   ` Andy Nicholas
@ 2010-08-14 11:44     ` mike marchywka
  0 siblings, 0 replies; 5+ messages in thread
From: mike marchywka @ 2010-08-14 11:44 UTC (permalink / raw)
  To: cygwin

On 8/13/10, Andy Nicholas <> wrote:

> The scripts we're using form the basis of a build system to invoke GCC and
> an
> assembler lots of times throughout a directory tree of a few thousand items.

You can end up spending all your time chasing include paths that isn't
hard to do.

> to use multi-threaded builds. When running each testing method, the CPUs are
> barely loaded at all (10%, maybe) and there's almost no I/O that registers.
Is the disk light on ? This is almost always an indication of blocking
for something. Check task manager page faults for example.


> Btw, I don't think the issue is I/O. The disk I'm using is an SSD (OCZ
> Vertex
> 2) which is fairly fast. But, the results repeat even if I try a regular
> 7200
> RPM hard drive.

I should add this to my manifesto against adjectives along with
fast snail comments. 7200rpm=720/6 revs-per-second=120rps.
This puts rotation time somewhere in millisecond range. Track to
track seeks won't subtract from that. Memory of course is in
nanosecond range, 1e6 times faster.
The issue is likely
to be buffering strategies and syncing.


>
> Yeah, weird.
>
> andy
>
>
>
>
>
>
> --
> 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
>
>


-- 
marchywka@gmail.com
note new address 2009-12-16:
Mike Marchywka
1975 Village Round
Marietta GA 30064
415-264-8477 (w)<- use this
404-788-1216 (C)<- leave message
989-348-4796 (P)<- emergency only
marchywka@hotmail.com
Note: If I am asking for free stuff, I normally use for hobby/non-profit
information but may use in investment forums, public and private.
Please indicate any concerns if applicable.
Note: hotmail is censoring incoming mail using random criteria beyond
my control and often hangs my browser
but all my subscriptions are here..., try also marchywka@yahoo.com

--
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] 5+ messages in thread

end of thread, other threads:[~2010-08-14 11:44 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-08-14  0:40 Cygwin speed difference on multiple cores -vs- single-core? Andy Nicholas
2010-08-14  1:05 ` Tim Prince
2010-08-14  2:06   ` Andy Nicholas
2010-08-14 11:44     ` mike marchywka
2010-08-14  1:24 ` mike marchywka

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).