-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ninja load average -l option needs documenting #630
Comments
I second this request. I just tried this option, and it's not clear what it does, or if it does anything at all, and how it relates to the "-j" option if both are used together. In particular, I used "-j 30 -l 4" and I saw the load increasing to 10. My only guess is that jobs are started so quickly that we can't measure any load increase (if we use the 5-minute average) until more than 10 jobs have started. If you're curious why I'm using "-l", it is an attempt to solve a problem when compiling with ccache&distcc: With ccache&distcc, we start 30 jobs in parallel but most of them will end up running on other machines (with 30 being the sum of the number of cpus on all machines). The problem is that all these 30 start by doing something (run the C preprocessor) on the local machine, and when we start them all in parallel, the machine is overloaded. I wanted to start these 30 jobs gently - so that eventually we do have 30 of them running in parallel (but most not consuming CPU because they are compiling on another machine) but we don't start all of them at once. I was hoping that "-l" will help me do it, but it's not quite helping as I hoped. |
This comment was marked as abuse.
This comment was marked as abuse.
Amazing that this is still open after 7 years :). I've also stumbled upon this and only found an explanation in the code unfortunately. EDIT: The commit that introduced this change (-l option) describes it pretty well. |
I would also want this feature to be more documented. |
+1 |
if you build a skyscraper, then do not provide an elevator to it, what is the point building it, if this feature is low priority, then shouldn't that be delayed for later, then implementation + documents come along together? |
This issue is almost 9 years old, but if anyone happens upon it and sees this:
There's a much better way to solve that: But anyway, that controls how many parallel C/C++ preprocessing jobs For example I set You'll also want to use the job pools feature of It works fairly well, in scenarios that are constrained by both CPU and RAM. It's not perfect, but build scheduling is a non-trivial problem. |
Busy doing preparations for the tenth birthday of this issue. |
Using Not only is the It is not only that everything Google does eventually becomes abandoned. But why do we let software made by organized crime like this infect “open source” software anyway? I’m going to check out samurai as a drop-in now. Until I can trash Webkit (and |
That’s called architecture! Not engineering. :D |
Low priority issue, but there's no mention in the ninja manual of the ninja load average -l feature. It's listed in ninja --help output, but there's no indication what the range of the value N is.
The text was updated successfully, but these errors were encountered: