|
Boost-Build : |
Subject: Re: [Boost-build] Extremely slow gcc launches on Cygwin
From: Belcourt, Kenneth (kbelco_at_[hidden])
Date: 2010-08-18 15:09:08
On Aug 18, 2010, at 12:43 PM, Emil Dotchevski wrote:
> It appears that on Cygwin bjam uses fork() to spawn a new instance of
> it when it launches gcc. I have 2 reasons to suspect that: 1) I see a
> second bjam.exe in Process Explorer and 2) while building a very very
> large Jamfile, every launch of gcc takes *forever*, which can be
> explained by the inefficient Cygwin fork() implementation (on Windows,
> fork() has to copy all of the memory that belongs to the process.)
I thought we were using vfork, a more efficient fork that doesn't copy
as much of the old process address space, and is generally much faster.
Can you check if the Cygwin built bjam is using vfork? If it is,
perhaps there's a known issue with vfork on Cygwin?
> If my suspicion is correct, then my question is can the fork() be
> replaced by posix_spawn() or some such? If not, what could be causing
> the extremely slow gcc launches?
Can you check for zombies or other dead processes? Perhaps bjam isn't
properly killing processes that time out or is not releasing resources
after processes terminate? This would definitely slow down the OS.
-- Noel
Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk