-
Notifications
You must be signed in to change notification settings - Fork 30k
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
doc: add note to parallelize make #9961
Conversation
Perhaps it would be even better to mention what the number after '-j' means. |
Very good point. I added a short description (as I don't understand the gory details myself) and also added a link to the official GNU make parallelism documentation for those interested in the details. Do you think that's excessive? |
@@ -36,6 +36,8 @@ $ make | |||
|
|||
Note that the above requires that `python` resolve to Python 2.6 or 2.7 and not a newer version. | |||
|
|||
*note: Running make in parallel, ```$ make -j8``` where ```-j8``` specifies that 8 recipes should run concurrently, can significantly reduce build time. See the [GNU Make Documentation](https://www.gnu.org/software/make/manual/html_node/Parallel.html) for more information.* | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm guessing that most people won't know what a recipe is so maybe make that "compile job" or something like that?
Style nit: can you wrap lines at 80 columns? You also don't need to use triple backticks, single ones suffice. I wouldn't necessarily use italics either but that's more of a personal preference.
I think we should add This is based on what I saw at the code and learn; sure it would be great if people read more but typically they start running stuff in order (which is reasonable for people who are new to something). So... it seems somewhat odd to tell people to build without it and then come back around and say to do it with it. It would be best for the general experience for it to be directly there, with notes if it does not work and for additional processor cores. |
I guess the question is whether using If most people have 2/4 core hyperthreaded laptops, I'd say just use |
See also #8286. There is some discussion there but from my observations the average appears to be 4 threads (some have less or more).
|
I have a coworker who just got a new dual core MacBook Pro (I believe it is hyper-threaded). I'll ask him to run make with -j8, -j4, -j2, and without parallelism today and get some metrics on how long each took. I realize that it will be extremely unscientific, but it may give us a bit of insight. Side note, it would be really cool if we could figure out a way to gather some metrics on what kind of machines people are using to develop node and node projects. Maybe eventually we can send out a hardware survey like the user survey that was just sent out? |
This actually came up during the code and learn for someone with a MacBook Air. We had to switch to -j4 since they couldn't even use their browser with -j8 |
Really Really Unscientific Benchmark Results:Values taken from running I ran out of time with my coworker's laptop to run it without concurrency but that's kind of irrelivent to the current conversation anyway. Mid 2012 Macbook Pro - 2.3GHz i7 - Hyper-Threaded Quad Core
Late 2016 Macbook Pro - 2.0GHz i5 - Hyper-Threaded Dual Core
Running with Seeing these extremely unscientific results, and taking into account that |
I went ahead and changed the docs to use If we want to standardize on It also may be worth the effort for us to have our own doc on |
+1, might as well do it in this PR |
@bnoordhuis LGTY now? This looks land-able to me! |
@jmdarling This isn't patching cleanly for me, do you think you'd be able to squash this into two commits (one for the note, one for the standardization of -j4)? |
Standardizes docs to use -j4 instead of -j8 as it appears to be the most inclusive recommendation based on discussion in nodejs#9961.
Adds a note to the BUILDING doc to encourage parallelizing make. When I first built node I didn't know this trick and thought that the build was just stuck in an infinite loop after waiting for 10 minutes.
Standardizes docs to use -j4 instead of -j8 as it appears to be the most inclusive recommendation based on discussion in nodejs#9961.
2567c3c
to
f42cdc7
Compare
Sorry for the slow turnaround on that. My git-fu isn't what it should be and that simple task turned into an arduous journey 😝. |
Landed in d8c7534...0cd1f54, thanks for the contribution! :D |
Adds a note to the BUILDING doc to encourage parallelizing make. When I first built node I didn't know this trick and thought that the build was just stuck in an infinite loop after waiting for 10 minutes. Refs: #8286 Refs: #9881 PR-URL: #9961 Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Standardizes docs to use -j4 instead of -j8 as it appears to be the most inclusive recommendation based on discussion in #9961. PR-URL: #9961 Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Adds a note to the BUILDING doc to encourage parallelizing make. When I first built node I didn't know this trick and thought that the build was just stuck in an infinite loop after waiting for 10 minutes. Refs: #8286 Refs: #9881 PR-URL: #9961 Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Standardizes docs to use -j4 instead of -j8 as it appears to be the most inclusive recommendation based on discussion in #9961. PR-URL: #9961 Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Adds a note to the BUILDING doc to encourage parallelizing make. When I first built node I didn't know this trick and thought that the build was just stuck in an infinite loop after waiting for 10 minutes. Refs: #8286 Refs: #9881 PR-URL: #9961 Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Standardizes docs to use -j4 instead of -j8 as it appears to be the most inclusive recommendation based on discussion in #9961. PR-URL: #9961 Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
the v4.x |
Adds a note to the BUILDING doc to encourage parallelizing make. When I first built node I didn't know this trick and thought that the build was just stuck in an infinite loop after waiting for 10 minutes. Refs: #8286 Refs: #9881 PR-URL: #9961 Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Standardizes docs to use -j4 instead of -j8 as it appears to be the most inclusive recommendation based on discussion in #9961. PR-URL: #9961 Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Adds a note to the BUILDING doc to encourage parallelizing make. When I first built node I didn't know this trick and thought that the build was just stuck in an infinite loop after waiting for 10 minutes. Refs: #8286 Refs: #9881 PR-URL: #9961 Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Standardizes docs to use -j4 instead of -j8 as it appears to be the most inclusive recommendation based on discussion in #9961. PR-URL: #9961 Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Checklist
Affected core subsystem(s)
doc
Description of change
Adds a note to the BUILDING doc to encourage parallelizing make. When I
first built node I didn't know this trick and thought that the build was
just stuck in an infinite loop after waiting for 10 minutes.