From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mout.gmx.net (mout.gmx.net [212.227.15.19]) by sourceware.org (Postfix) with ESMTPS id 5938E384AB45 for ; Wed, 10 Apr 2024 23:16:37 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 5938E384AB45 Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=gmx.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmx.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 5938E384AB45 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=212.227.15.19 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.com; s=s31663417; t=1712790996; x=1713395796; i=sam.edge.cygwin@gmx.com; bh=0NNYld22Rs/3EihEo+OnAqy85093nLm+Or2arizKrN8=; h=X-UI-Sender-Class:Date:Reply-To:Subject:To:References:From: In-Reply-To; b=fflx4x5UMcKSyOJAsCl+NEfwxS9NoVM5rWRHvoIkkG2WyailRSy+5fDgB7M5WSQO 3oc4QJ7BW1bm4+ZatrAJe+5cfe6YLIZ24M1HkSbGX+CjUIdcFi7pkQDgwg+Gm8Z8C a+3KkgD+/YrUMFkSHSOKUd5RDYlaiDF0IP6sw0+CHhbYSgy5yQmCeHZU+CRDYfb7q Bo7uIEydioM/pfp2gq7ShMqgdOoly8RyAn1AWFXjK9zv9cMZyVZsBRbmK3SlppWeT SHOChj8wwBlWzuw/3JQ72dIIY2f6pACZjJqBrYO62Ho0WDQmOfjPx6dse4G8I4Yvg Kzj9hpKpY8PWhRjNzg== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from [192.168.15.105] ([88.97.26.74]) by mail.gmx.net (mrgmx004 [212.227.17.184]) with ESMTPSA (Nemesis) id 1MK3Rs-1sCgx53jB8-00LSKW for ; Wed, 10 Apr 2024 18:43:05 +0200 Message-ID: Date: Wed, 10 Apr 2024 17:43:05 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Reply-To: cygwin@cygwin.com Subject: Re: Cygwin a bit slow To: cygwin@cygwin.com References: Content-Language: en-GB From: Sam Edge In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable 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 List-Id: 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 confidenc= e! 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. :-) =2D- Sam Edge