Cygwin 1.7.7 fork/exec performance MUCH slower than 1.5.25

SZABÓ Gergely szg@subogero.com
Thu Sep 30 13:37:00 GMT 2010


Hello,

we have a Cygwin-based build system for an embedded project.
Build performance has deteriorated terribly since we upgraded to 1.7.x from 1.5.25.

I've created 3 shell-scripts to benchmark 1.5.25 and 1.7.7 against each other.
- null    : read file "inp" line by line, write to /dev/null.
- builtin : write each line to file "out", only bash-builtins used (no fork)
- fork    : do some substitution for each line with sed (huge number of forks)

Results:
- null    : 1.7.7 is about 5 times faster
- builtin : 1.7.7 is slightly faster
- fork    : 1.7.7 is 5 times SLOWER !!!

All measurements were made with the "time" command.
The attached results.txt lists the "real" times.

I've also attached the 3 shell-scripts (null, builtin, fork).
Input file "inp" is also attached.

Also see the cygcheck_xxx.out files for both Cygwin versions.

Some notes: 
both cygwin versions use the same /home, mounted from "D:\Documents and Settings",
so all user-level config-files are shared between the Cygwin versions.

Cygwin 1.7.7 is basically unusable at the moment.
Any ideas why it's so much slower at spawning processes? Or is it the pipes? Am I doing something wrong?

And more importantly: is there an easy way to fix this?

Thanks in advance for any help!

Best regards
Gergely Szabó

-------------- next part --------------
Cygwin      1.5.25      1.7.7
-----------------------------
null      0:00.491   0:00.148
builtin   0:03.691   0:03.326
fork      0:53.421   4:11.861
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cygcheck_1_5_25.out
Type: application/octet-stream
Size: 34593 bytes
Desc: cygcheck_1_5_25.out
URL: <http://cygwin.com/pipermail/cygwin/attachments/20100930/81540b39/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cygcheck_1_7_7.out
Type: application/octet-stream
Size: 114601 bytes
Desc: cygcheck_1_7_7.out
URL: <http://cygwin.com/pipermail/cygwin/attachments/20100930/81540b39/attachment-0001.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fork
Type: application/octet-stream
Size: 113 bytes
Desc: fork
URL: <http://cygwin.com/pipermail/cygwin/attachments/20100930/81540b39/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: inp
Type: application/octet-stream
Size: 17702 bytes
Desc: inp
URL: <http://cygwin.com/pipermail/cygwin/attachments/20100930/81540b39/attachment-0003.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: null
Type: application/octet-stream
Size: 68 bytes
Desc: null
URL: <http://cygwin.com/pipermail/cygwin/attachments/20100930/81540b39/attachment-0004.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: builtin
Type: application/octet-stream
Size: 78 bytes
Desc: builtin
URL: <http://cygwin.com/pipermail/cygwin/attachments/20100930/81540b39/attachment-0005.obj>
-------------- next part --------------
--
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


More information about the Cygwin mailing list