Hacker News new | ask | show | jobs
by nicce 760 days ago
> I have a powerful machine, but it still takes 20-40 seconds for a one line change, which would normally be 2-3s (editing the config + restarting a service)

A bit late reply, but by default Nix runs on single core. Have you made it use multi-core and max-jobs?

2 comments

Okay I looked it up, and the default is max-jobs=auto (uses # of logical cores) and cores=0 (each job can use all threads), so if I have a machine with 16 cores and 32 threads, it may run 32 jobs at the same time, where each job is allowed to use 32 threads.

See:

https://search.nixos.org/options?channel=unstable&show=nix.s...

https://search.nixos.org/options?channel=unstable&show=nix.s...

and

https://nixos.org/manual/nix/stable/advanced-topics/cores-vs...

Thanks for the heads-up, will look into this, I think I tried something with this but didn't see much better performance, but has been a while since I tried that.