Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(72)

Issue 24106005: Add cpu_limit to ninja link pool on windows. (Closed)

Created:
7 years, 3 months ago by iannucci
Modified:
7 years, 3 months ago
Reviewers:
jschuh, Nico, scottmg
CC:
gyp-developer_googlegroups.com
Visibility:
Public.

Description

Add cpu_limit to ninja link pool on windows. This will cap the number of links at the min of cpu_count v. mem / 4G. R=scottmg@chromium.org Committed: https://code.google.com/p/gyp/source/detail?r=1724

Patch Set 1 #

Total comments: 1

Patch Set 2 : #

Patch Set 3 : #

Patch Set 4 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+7 lines, -1 line) Patch
M pylib/gyp/generator/ninja.py View 1 2 3 1 chunk +7 lines, -1 line 0 comments Download

Messages

Total messages: 10 (0 generated)
iannucci
7 years, 3 months ago (2013-09-11 20:06:27 UTC) #1
scottmg
https://codereview.chromium.org/24106005/diff/1/pylib/gyp/generator/ninja.py File pylib/gyp/generator/ninja.py (right): https://codereview.chromium.org/24106005/diff/1/pylib/gyp/generator/ninja.py#newcode1510 pylib/gyp/generator/ninja.py:1510: cpu_limit = multiprocessing.cpu_count() that does if sys.platform == 'win32': ...
7 years, 3 months ago (2013-09-11 20:09:05 UTC) #2
iannucci
On 2013/09/11 20:09:05, scottmg wrote: > https://codereview.chromium.org/24106005/diff/1/pylib/gyp/generator/ninja.py > File pylib/gyp/generator/ninja.py (right): > > https://codereview.chromium.org/24106005/diff/1/pylib/gyp/generator/ninja.py#newcode1510 > ...
7 years, 3 months ago (2013-09-11 20:36:21 UTC) #3
iannucci
OK, PTAL (untested). I could also use some help testing this out if anyone of ...
7 years, 3 months ago (2013-09-12 00:18:58 UTC) #4
scottmg
On 2013/09/12 00:18:58, iannucci wrote: > OK, PTAL (untested). I could also use some help ...
7 years, 3 months ago (2013-09-12 00:24:38 UTC) #5
iannucci
On 2013/09/12 00:24:38, scottmg wrote: > On 2013/09/12 00:18:58, iannucci wrote: > > OK, PTAL ...
7 years, 3 months ago (2013-09-12 00:33:46 UTC) #6
scottmg
lgtm
7 years, 3 months ago (2013-09-12 00:34:11 UTC) #7
iannucci
Committed patchset #4 manually as r1724 (presubmit successful).
7 years, 3 months ago (2013-09-12 00:39:50 UTC) #8
Nico
When writing change descriptions either say why you're making a change, or point to a ...
7 years, 3 months ago (2013-09-12 20:06:47 UTC) #9
iannucci
7 years, 3 months ago (2013-09-12 21:25:54 UTC) #10
Message was sent while issue was closed.
On 2013/09/12 20:06:47, Nico wrote:
> When writing change descriptions either say why you're making a change, or
point
> to a bug that says why you are making a change. For this CL it's not clear to
me
> as linking often isn't cpu bound.

Ah, sorry. For posterity:

We have many bare-metal build configurations provisioned with a lot (128GB) of
memory, but with only a single CPU package (usually w/ 4 cores + HT). Because we
were only looking at memory usage previously, these machines ended up running
12+ simultaneous links which swamped the machine like crazy.

As you note, the link steps are not really CPU bound. Ideally we could model:
  * The IOPs supported by the underlying storage
  * The I/O profile of the link processes (which is dependent on things like
fastbuild, LTCG, etc.)
and then use this as the metric for limiting the links instead of cores.

We chose to use the core count as a rough approximation to strength of the
machine (since it was easy to calculate) to get the waterfalls unblocked in the
mean time. If we have a more accurate model of the way that the link processes
work, I think it would be easy to get the random-read latency of the underlying
storage, and then we could actually calculate a /really/ good number for this
concurrency.

That said, it looks like there's actually a variety of configurations in this
class of builder (some w/ 8 logical cores, some w/ 16+), and it's not really a
good heuristic anyway (for the reason you mention). I'm going to put up another
CL to reverse this one and hard cap at 4 (i.e. I'm 'giving up'). I'll put you on
the CL as well.

Powered by Google App Engine
This is Rietveld 408576698