X-Recipient: archive-cygwin AT delorie DOT com DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C4F773849AE7 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com; s=default; t=1712791023; bh=dhOErCkHHbPZst6ZtxFVSOsTi997v5r2yLdh+3cXJWw=; h=Date:Subject:To:References:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=lqxXiebCO4gySZ3xLolhvhWyG/RJONfOkMWnWPAvrBjNBJvC+ksCqoR2WStMS4BEE JYEBNUF0EZ/pGIHZdLX9VoT/76xD2LwFrPHnZF249IzowlDqRkXhe5/VB1KBZEgYv4 5b9Q3m5K0qEKKXXsMNtVDqVBHKg4a7eIJBwYsxho= X-Original-To: cygwin AT cygwin DOT com Delivered-To: cygwin AT cygwin DOT com DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 5938E384AB45 ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 5938E384AB45 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1712790999; cv=none; b=pyTlyTp2C7G1ZpYrrY5DTR+DrvdHoop9O+/1OCYlpxJe36TfReCwW7Kw8slpdDum7L2zFqlwGSQex0aSU+WBZw3ZppXugVDvykP6YzsmUQLxe2qW/fyy82QIYy71A9r1pA3y58B1Y4NUPYnuNjNDGXj33k+OM6ay38a7fGLxi8Y= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1712790999; c=relaxed/simple; bh=0NNYld22Rs/3EihEo+OnAqy85093nLm+Or2arizKrN8=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=GZTVWYfeXqOP7ZLXC0fZXJzu2Z5Q2LEGbRqAFhwzRPMg7Z4P4jEIaChFwb7LadQpg4Xw+0XkYJF1tuxIbIGbVLOv4109JXtHT8hc0x+oiwpefYnL7Gpfl9IPNkUxs7+/PIEqcC1qbn4XoAOV0NGTqrHlCo6O+AVF6NxggyDCADI= ARC-Authentication-Results: i=1; server2.sourceware.org X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Message-ID: Date: Wed, 10 Apr 2024 17:43:05 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Cygwin a bit slow To: cygwin AT cygwin DOT com References: Content-Language: en-GB In-Reply-To: X-Provags-ID: V03:K1:0VXoI2rSrDEr4YV4vcnxEB+sk0LkZM204EIv1waWl0bjqXa5A6Y g7BfMktxhRazuEW3cSzKl5xJTabJBUxG9yjp4LSMncDttLeH6stH+3QS/TxKOFjlYs+ppRe UMG6TvZIfsVCPIIoQy0QO0q/wVnsDmdROloN8DCWEhum3t0L/S+uSXlBuGsVVdivpz7gfGt HWienuUhVgDi1VmnmRHVg== UI-OutboundReport: notjunk:1;M01:P0:GtNt5eWpsIo=;FWUH26HJ+PGfXTgXQbbo/Li6HiE 1Xidu+Z5/n/0NrvhxP7H1k9UaPbLCQf4LcbJ5f0ED85VQ2UNOHqPXJOrBEyVfIOggusePvkHV FqdvDexUXXO9a/yIJrMqXG/m++Ew4eCOngWZxqXOVgu+d0Ty74gtcbREmTjskN1byOLsfQwRi 9FK4i+LY8QYNwRsk85HofmTRPW83iJdZAGk1WbZHJRahzZNTkHwtuKmKRpjTf2PZz7F9YGE43 T5mh/xv5Y7EuO/kIwk5FqlqZKH/EgSMeejxL9RFIHPlPf21fuJSVzL8zwc69ur1tcjM5Ym1Xa MMGWLy4yhhTmXqRzuW/Rt3n/wXzAYtEB1u+RT7fhIGGWiaH82hp/S5lj7p7og99dDxsAUZaFZ Nxqu+XL4/FKTVNDSF7SuV9nrkFe03cKgUlwuDAIM0vKp/XJl5o+cSnOxwd9qS/1uiYKYdHJpi GZnDl3p4bc3MJ3yhQv9+94rQdlYCU66SA1A3xP2GwJmgUykVKLL0eG3LW0Q3/u2qhVE4iOSD2 WZJyYanPRf6zO8DL6897P9vzxssF2DqFktIoBRn9BgiPKVLJUJYrNR50sRzgFQnWnsyQoeSAo vZ/tpTvDsZiDUUlZAGwxLtdqmuBqSdMj5wEWGrFDTRZVN5lx1bUUiWRHecn1T3LdwoIr/DnUH hn2eCcLPaVrboe1q9w7lOqYytV/vUa8XylxKQH0DwzTCXV4p2BbhleFoqIo7ZkH1vj4JFhKb3 AhUe4nz5zyEBDaNVWM5Bc3qLaWjOyyeHCCsIpv11F19DUApTjJO7bvGYYqRNs4Svzf89sbhQu lWsDn5CVFbFsx53YUl5+qd/uE/gyW3T+MgtvGR5TDTFHY= X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00, DATE_IN_PAST_06_12, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: cygwin AT cygwin DOT com X-Mailman-Version: 2.1.30 Precedence: list List-Id: General Cygwin discussions and problem reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Sam Edge via Cygwin Reply-To: cygwin AT cygwin DOT com Cc: Sam Edge Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com Sender: "Cygwin" On 10/04/2024 11:34, Christian Franke via Cygwin wrote: > J M via Cygwin wrote: >> ... >> >> Specifically for this problem, I have investigated the problem and can be >> related to pipes and antivirus. >> >> Specifically >> while true >> do >> echo ABC | grep AAA >> done >> >> It makes the cpu of that antivirus go up. > > This is as expected because malware scanners hook into Win32 API's > CreateProcess*() calls which are also used by the fork()/exec() > emulation of Cygwin. Each run of 'grep' above uses at least two > CreateProcess*() calls. This is very true and depends greatly on the AV being used. I find Trend is particularly bad, even if you exclude all the Cygwin directories and directories of files being accessed. Somehow, the way the hooks are implemented stalls process creation and file open in ways that Windows Defender does not. This is particularly noticeable when using Cygwin-based build tools - build times generally increase at least 10-fold after installing Trend. On one job, I wasted a lot of time and client's money collecting logs for Trend to analyse to no avail. I think the product is basically very badly written. The fact that it creates dozens of processes with hundreds of threads just to do AV scanning does not fill me with confidence! Wherever possible, I remove third-party AV from Windows machines and install group policy to enforce Windows Defender and malware detection in the browser and/or a proxy & the email server instead. Saves a lot of CPU cycles. :-) -- Sam Edge -- Problem reports: https://cygwin.com/problems.html FAQ: https://cygwin.com/faq/ Documentation: https://cygwin.com/docs.html Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple