emacs2nix
emacs2nix copied to clipboard
Increase default threads per CPU
One thread per CPU is used by default. Generating packages is heavily IO-bound. My own experiments suggest that four threads per CPU works better. See also #16.
I'll just note that in my four-core, SSD laptop, I found 6 to be a little bit better for keeping the machine saturated, but not over-committed---8 was too many, and other things became unusable, and 4 was too few and I had a fair bit of idle time.
This probably depends on what type of storage hardware is used. With a spinning disk, I found 4*NCPUS worked best. With an SSD, it sounds like 1.5*NCPUS works better. I think the sensible thing to do here is increase the default number of threads to 1.5*NCPUS and advise increasing that number if it does not saturate.