public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Eliot Moss <moss@cs.umass.edu>
To: Hamish McIntyre-Bhatty <hamishmb@live.co.uk>,
	Cygwin General Mailing List <cygwin@cygwin.com>
Subject: Re: Cygwin fork performance followup
Date: Thu, 4 Feb 2021 09:44:30 -0500	[thread overview]
Message-ID: <2b4429db-ab6f-b40a-a1f2-2a8db91e8f88@cs.umass.edu> (raw)
In-Reply-To: <DB7PR02MB399612414B93126C61DC2E0AE7B39@DB7PR02MB3996.eurprd02.prod.outlook.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

      reply	other threads:[~2021-02-04 14:44 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-04 14:29 Hamish McIntyre-Bhatty
2021-02-04 14:44 ` Eliot Moss [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2b4429db-ab6f-b40a-a1f2-2a8db91e8f88@cs.umass.edu \
    --to=moss@cs.umass.edu \
    --cc=cygwin@cygwin.com \
    --cc=hamishmb@live.co.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).