4 ms·
> 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
by nicce 2y 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?
- SushiHippie 2y agoOkay 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.settings.max-jobs&from=0&size=50&sort=relevance&type=packages&query=nix.settings.max-jobs https://search.nixos.org/options?channel=unstable&show=nix.s... https://search.nixos.org/options?channel=unstable&show=nix.settings.cores&from=0&size=50&sort=relevance&type=packages&query=nix.settings.cores https://search.nixos.org/options?channel=unstable&show=nix.s... and https://nixos.org/manual/nix/stable/advanced-topics/cores-vs-jobs https://nixos.org/manual/nix/stable/advanced-topics/cores-vs...
- SushiHippie 2y agoThanks 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.