From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ej1-x62a.google.com (mail-ej1-x62a.google.com [IPv6:2a00:1450:4864:20::62a]) by sourceware.org (Postfix) with ESMTPS id ABC00387089B for ; Wed, 16 Dec 2020 17:36:45 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org ABC00387089B Received: by mail-ej1-x62a.google.com with SMTP id 6so19293365ejz.5 for ; Wed, 16 Dec 2020 09:36:45 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=VnPKD4cPCApdgmNoMXwsg/2wO9oB4e5Hh4B0Qbcg2UI=; b=Df4broqkUzRYWqyVvDlD5Pax1ogJQClae7uVfhrNyAn4EulFuE95vJolv6p47Uo+ni dySzgNYs4vjpSyZnVw6hxR6SFo/IMgRxoKEXS7JOkIJULh7xHQNsLNH+ZxHKnp70KNVY OE/BiJVy1onc8thO9zaNjnrtRSAg28sSoIo6Ik4tVQanC456BL8UM3A394q4dYFkd5oT SBRMn8fCrNrw++LVjr8nRgmGGsyW+Dj0V2L3TAmEwoE1k2unSqjnvFk3QbUkT6LAjyrf oYaQ4zWmPOAFkM38hSXYtr+OAiQZj+dyFimf5uRTqek4IS1LyrEVLZb2o7fEOAG9nl8C Ljaw== X-Gm-Message-State: AOAM533sbcfkIJFx0Kv0VtFjWaw3AENdL5JrLeGIcf8bqPCJ3dPsHyBq cx65LQYuFuIchzHXOYf+FKISRSYFg5vLiomc X-Google-Smtp-Source: ABdhPJyxVI8nB5fMg8yTK7lj6z+PA97hdEf8VCsi2wYnQS7Ci5esRkH8Hh7TvGoW+Oh0JPtgyzxtAw== X-Received: by 2002:a17:906:d87:: with SMTP id m7mr19272330eji.108.1608140204809; Wed, 16 Dec 2020 09:36:44 -0800 (PST) Received: from ?IPv6:2003:cc:9f10:5819:3c70:74d1:da7:8026? (p200300cc9f1058193c7074d10da78026.dip0.t-ipconnect.de. [2003:cc:9f10:5819:3c70:74d1:da7:8026]) by smtp.gmail.com with ESMTPSA id i26sm1829287eja.23.2020.12.16.09.36.44 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 16 Dec 2020 09:36:44 -0800 (PST) Subject: Re: Optimising cygwin fork performance To: cygwin-apps@cygwin.com References: From: Marco Atzeri Message-ID: Date: Wed, 16 Dec 2020 18:36:45 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.5.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: it Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: cygwin-apps@cygwin.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Cygwin package maintainer discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Dec 2020 17:36:49 -0000 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.