public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Bash / cygwin process spawning (?) performance very slow
@ 2015-09-23  8:52 litter
       [not found] ` <20150923112430.C036A740.helmut.karlowski@ish.de>
  2015-09-23  9:29 ` Marco Atzeri
  0 siblings, 2 replies; 16+ messages in thread
From: litter @ 2015-09-23  8:52 UTC (permalink / raw)
  To: cygwin

Hi all,

I noticed that doing simple loops in Bash takes unexpectedly long under Cygwin on a Windows XP 32 bit machine 
(CYGWIN_NT-5.1 <machine> 2.2.1(0.289/5/3) 2015-08-20 11:40 i686 Cygwin)

I already followed the FAQ advice in trying to determine general causes, and made a 'shadow' copy of /etc/passwd as described.
My PATH does not contain references to network shares.

Still quite normal commands take a long time e.g. 
time cat some-file | while read i;do echo $i;/bin/true;done

real 1m44.953s
user 0m9.599s
sys 1m36.865s

for a file of 167 lines. Process Explorer showed a CPU load of 20% on bash.exe, which was almost completely Kernel time.
Is such high Kernel load normal?

I know it's a bit like comparing apples to oranges, but I run the SAME command from the same disk, from within a Debian 7 486 Linux on VirtualBox (!) on the same machine, it gave
real 0m3.871s
user 0m0.160s
sys 0m3.292s

So even running in emulator, real/user/sys time are about 30/60/30 times faster. That's quite shocking.
Is this performance to be expected? That would make it an obvious choice to switch to VirtualBox on this machine.

Thanks,
Paul

--
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] 16+ messages in thread
* Re: Bash / cygwin process spawning (?) performance very slow
@ 2015-09-23 15:26 litter
  2015-09-23 16:55 ` Helmut Karlowski
  0 siblings, 1 reply; 16+ messages in thread
From: litter @ 2015-09-23 15:26 UTC (permalink / raw)
  To: cygwin

> litter@null.net:
> Wed, 23 Sep 2015 10:52:26 +0200
> ---------------------------------------------------
>> Hi all,
>> 
>> I noticed that doing simple loops in Bash takes unexpectedly long under Cygwin on a Windows XP 32 bit machine 
>> (CYGWIN_NT-5.1 <machine> 2.2.1(0.289/5/3) 2015-08-20 11:40 i686 Cygwin)
>> 
>> I already followed the FAQ advice in trying to determine general causes, and made a 'shadow' copy of /etc/passwd as described.
>> My PATH does not contain references to network shares.
>> 
>> Still quite normal commands take a long time e.g. 
>> time cat some-file | while read i;do echo $i;/bin/true;done
>> 
>> real 1m44.953s
>> user 0m9.599s
>> sys 1m36.865s
> 
> #wc t; time cat t  | while read i;do echo $i;/bin/true;done >/dev/null
>  172  172 3448 t
>     3.73s real     0.04s user     0.43s system
> 
> On cygwin 1.7.35 and XP32. Not THAT fast but similar to your 
> linux-result. I guess your antivirus is interfering. I've configured 
> my avast to not deep-scan anything in C:\cygwin\bin, maybe that helps.
> 
> -Helmut

Thanks for the reply Helmut,

Although the /dev/null probably contributes a bit to the timing
it's clear not all 32 bit XP systems suffer from this, thanks for that!

I'm not running any antivirus as far as I'm aware of (I do run a Comodo firewall with all "virus" scanning disabled).
I checked again, and it really is the Bash.exe which is consuming a lot of Kernel time. I didn't spot another process kicking in and consuming cycles.

Any idea how to diagnose the cause of this? Is there any Cygwin specific logging/tracing to see where it is happening?

Thanks,
Paul


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

end of thread, other threads:[~2015-09-24 21:03 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-23  8:52 Bash / cygwin process spawning (?) performance very slow litter
     [not found] ` <20150923112430.C036A740.helmut.karlowski@ish.de>
2015-09-23  9:24   ` Helmut Karlowski
2015-09-23  9:29 ` Marco Atzeri
2015-09-23 15:17   ` litter
2015-09-23 15:58     ` Marco Atzeri
2015-09-24  9:57       ` litter
2015-09-24 10:22         ` Marco Atzeri
2015-09-24 17:24           ` litter
2015-09-24 17:34             ` Cliff Hones
2015-09-24 17:47             ` Lee
2015-09-24 18:44               ` Marco Atzeri
2015-09-24 18:58               ` litter
2015-09-24 21:03             ` Solved " litter
2015-09-23 15:26 litter
2015-09-23 16:55 ` Helmut Karlowski
2015-09-24 17:27   ` litter

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