delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2021/02/04/09:45:34

X-Recipient: archive-cygwin AT delorie DOT com
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 770EB3858034
Authentication-Results: sourceware.org;
dmarc=none (p=none dis=none) header.from=cs.umass.edu
Authentication-Results: sourceware.org;
spf=pass smtp.mailfrom=moss AT cs DOT umass DOT edu
Subject: Re: Cygwin fork performance followup
To: Hamish McIntyre-Bhatty <hamishmb AT live DOT co DOT uk>,
Cygwin General Mailing List <cygwin AT cygwin DOT com>
References: <DB7PR02MB399612414B93126C61DC2E0AE7B39 AT DB7PR02MB3996 DOT eurprd02 DOT prod DOT outlook DOT com>
From: Eliot Moss <moss AT cs DOT umass DOT edu>
Message-ID: <2b4429db-ab6f-b40a-a1f2-2a8db91e8f88@cs.umass.edu>
Date: Thu, 4 Feb 2021 09:44:30 -0500
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101
Thunderbird/68.12.1
MIME-Version: 1.0
In-Reply-To: <DB7PR02MB399612414B93126C61DC2E0AE7B39@DB7PR02MB3996.eurprd02.prod.outlook.com>
X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00, JMQ_SPF_NEUTRAL,
KAM_DMARC_STATUS, NICE_REPLY_A, RCVD_IN_DNSWL_LOW, 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 AT cygwin DOT com
X-Mailman-Version: 2.1.29
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Unsubscribe: <https://cygwin.com/mailman/options/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=unsubscribe>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-request AT cygwin DOT com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
Reply-To: moss AT cs DOT umass DOT edu
Errors-To: cygwin-bounces AT cygwin DOT com
Sender: "Cygwin" <cygwin-bounces AT cygwin DOT com>

On 2/4/2021 9:29 AM, Hamish McIntyre-Bhatty via Cygwin wrote:
 > Hi all,
 >
 > I managed to improve my Cygwin VM's performance significantly using a
 > variety of methods.
 >
 > If anyone else is experiencing troubles, seeing what I changed at
 > https://www.hamishmb.com/blog/improving-cygwins-performance-fork/ might
 > also help you. Not using VirtualBox was the main improvement for me (now
 > using KVM/QEMU). Note that I didn't achieve much difference, but that
 > was because my system is relatively powerful. What isn't shown is that
 > these changes do seem to help with the fork speed drop-off that occurs
 > over time.

Yes, fork can be a bottleneck in Cygwin.  I do wonder if we might get some
improvement for a lot of common cases if spawn were used more, in favor of
fork, and Cygwin supported "fast paths" for the simpler cases of spawn, to
where the libraries in the child process would not need to be loaded in the
same place.  More complex cases of spawn could fall back to a fork-based
approach underneath.  The idea is to grab some low hanging fruit - if there is
any.  What I don't know is whether such fruit can be had.  For example, does
bash use spawn, and if so, does it use calls that could be optimized in this
way?  I don't know.  Likewise other tools that do lost of forking might need
to be inspected, such as 'make'.

I seem to recall this was discussed some before ...

Best wishes - Eliot
--
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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019