[PATCH] Cygwin: faq: add test of fork/exec slowdown by anti-virus
Christian Franke
Christian.Franke@t-online.de
Sat Mar 29 15:45:44 GMT 2025
Occasionally useful to see one significant effect of anti-virus software.
BTW, the documentation still uses C:\cygwin as the default install
directory. This is no longer the case since the retirement of the 32-bit
version.
--
Regards,
Christian
-------------- next part --------------
From a9438be956dc81ac237ef70f9c07934ba4906dae Mon Sep 17 00:00:00 2001
From: Christian Franke <christian.franke@t-online.de>
Date: Sat, 29 Mar 2025 16:34:33 +0100
Subject: [PATCH] Cygwin: faq: add test of fork/exec slowdown by anti-virus
Signed-off-by: Christian Franke <christian.franke@t-online.de>
---
winsup/doc/faq-using.xml | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/winsup/doc/faq-using.xml b/winsup/doc/faq-using.xml
index 4dc462a0a..e5e4479f5 100644
--- a/winsup/doc/faq-using.xml
+++ b/winsup/doc/faq-using.xml
@@ -956,6 +956,26 @@ contents are exempt from scanning. In a default installation, this
would be <literal>C:\cygwin\bin</literal>. Obviously, this could be
exploited by a hostile non-Cygwin program, so do this at your own risk.
</para>
+<para>Anti-virus software typically reduce the speed of Windows
+<literal>CreateProcess</literal> calls which are used by Cygwin to provide
+<literal>fork()</literal> and <literal>exec()</literal>. This in particular
+slows down shell scripts. In the simple speed test shown below, the first
+column shows the number of <literal>date</literal> commands run per second.
+Anti-virus was turned off at the line marked with <literal>***</literal>.
+</para>
+<screen>
+ bash$ while :; do date +%s; done | uniq -c
+ ...
+ 122 1741712430
+ 118 1741712431
+ 118 1741712432
+ 121 1741712433
+ 142 1741712434 ***
+ 140 1741712435
+ 141 1741712436
+ 144 1741712437
+ ...
+</screen>
<para>See also <xref linkend="faq.using.bloda"></xref>
for a list of applications that have been known, at one time or another, to
interfere with the normal functioning of Cygwin.
--
2.45.1
More information about the Cygwin-patches
mailing list