miniblog.

← Back to all posts
910
GNU Make defaults to a single worker, and newer build tools (e.g. ninja) default to the number of physical CPUs. I wish there was an option for 'leave me a little bit of my machine to do stuff'.

10 Comments

@wilfredh I wish multi-tasking worked well enough under high load that such an option wouldn't be necessary
And there should be a reasonable cap, say 8 or 16 or something, so you don't get 256 threads just because you happen to run it on a server (which is probably doing Other Stuff Too™, with that number of cores)...
@wilfredh This is why I've started wrapping build/IDE tooling in `nice`. It works okay!
@jewelpit Ooh, that's a neat idea! (Hope you're doing well! Long time no speak.)
@wilfredh Doing as well as I can! I work on a desktop app now, and I had no idea how much I'd enjoy it. How have you been?
@jewelpit Pretty good! I have a ~3 year old son now, it's amazing how fast he learns. I'm trying to expose him to as many different technology input types as I can :)
@wilfredh Wow! Congratulations! Time to dust off one of those "QBasic for Kids" books from the 80s, huh?
@wilfredh To leave you two cores out of however many are reported by /proc/cpuinfo (on linux): $ make -j $(expr $(grep '^processor' /proc/cpuinfo | wc -l) - 2)
@rst @wilfredh `nproc --ignore=N` to “leave” N cores alone, if you have nproc available.