Optimising cygwin fork performance

Marco Atzeri marco.atzeri@gmail.com
Wed Dec 16 17:36:45 GMT 2020



On 16.12.2020 13:13, Hamish McIntyre-Bhatty via Cygwin-apps wrote:
> Hi,
> 
> So I know it's been mentioned a lot that fork is slow on Cygwin, but
> compared to other people's machines, eg when building, it seems way
> slower for me.
> 
> First I'd like to know if there's a good way to measure this that anyone
> has found, because I'm not sure how to measure it. If I print multiple
> lines with echo in a script, I can see it printing maybe 2-3 a second -
> it's very slow.
> 
> I think this might be because I'm using a Virtual Machine with
> VirtualBox, and QEMU/KVM might be quicker. I'm using Avira Antivurus,
> with exceptions for the cygwin install folders (C:\cygwin64, C:\cygwin).
> 
> It might be nice if we could so some comparisons so I can figure out
> what's wrong.
> 
> Hamish

Same AV here, W10 64bit (no VM), 2 year old Laptop

model name      : Intel(R) Core(TM) i5-8250U CPU @ 1.60GHz
4 cores

https://github.com/mondalaci/fork-benchmark
it seems there is a aging effect

$ ./fork-benchmark.exe 1000
Forked, executed and destroyed 1000 processes in 39.928576 seconds.

$ ./fork-benchmark.exe 1000
Forked, executed and destroyed 1000 processes in 42.701295 seconds.

$ ./fork-benchmark.exe 1000
Forked, executed and destroyed 1000 processes in 49.890909 seconds.

$ ./fork-benchmark.exe 1000
Forked, executed and destroyed 1000 processes in 61.657031 seconds.




More information about the Cygwin-apps mailing list