# I/O & CPU scheduling, jobs & cores... and performance, baby

**URL:** https://discourse.nixos.org/t/i-o-cpu-scheduling-jobs-cores-and-performance-baby/66120
**Category:** Help
**Created:** [June 26, 2025, 6:52pm UTC](https://discourse.nixos.org/t/i-o-cpu-scheduling-jobs-cores-and-performance-baby/66120 "2025-06-26T18:52:02Z")
**Posts on this page:** 1
**Showing post:** 6

<div class="post-metadata">

### Author: ![frozen.frog23](https://discourse.nixos.org/user_avatar/discourse.nixos.org/frozen.frog23/32/31895_2.png) [@frozen.frog23](https://discourse.nixos.org/u/frozen.frog23)
#### Post date: [June 28, 2025, 12:28am UTC](https://discourse.nixos.org/t/i-o-cpu-scheduling-jobs-cores-and-performance-baby/66120/6 "2025-06-28T00:28:44Z")

</div>

wowie!!! 🤯 🤯 thanks thanks!! really, a lot. but uhm, what about the other 3 options i mentioned?

`nix.daemonIOSchedClass`  
`nix.daemonCPUSchedPolicy`  
`nix.daemonIOSchedPriority`

did i get that right, when i said

> [@frozen.frog23](#):
>
> `nix.daemonCPUSchedPolicy = "idle";`  
> `nix.daemonIOSchedClass = "idle";`  
> `nix.daemonIOSchedPriority = 7;` (doesnt work with `"idle"` anyway)  
> ^ this worsens building speed, improves system performance (while building)
> 
> _and the opposite would be…_
> 
> `nix.daemonCPUSchedPolicy = "other";` (default)  
> `nix.daemonIOSchedClass = "best-effort";` (default)  
> `nix.daemonIOSchedPriority = 0;`  
> ^ this improves building speed, worsens system performance (while building)

or am i confusing actual compilers like `glibc`, `gcc`, etc. and nix “derivation” builders? are those two different things?

🐸

OH! ALSO. wait wait wait, one more thing

what about `nix.daemonCPUSchedPolicy`’s

> This policy propagates to build processes. other is the default scheduling policy for **regular tasks**. The batch policy is similar to other, but optimised for **non-interactive tasks**.

what exactly are _“regular tasks”_ and _“non-interactive tasks”_? like a `[Y/n]` or..?

THANKS IN ADVANCE!!!

❄

EDIT: but wait! there’s more!

```auto
services.system76-scheduler.enable = true;
services.system76-scheduler.assignments = {
  nix-builds = {
    nice = 10; # from -20 (high) to 19 (low)
    class = "batch"; # "idle", "batch", "other", "rr", "fifo"
    ioClass = "idle"; # "idle", "best-effort", "realtime"
    matchers = [
      "nix-daemon"
    ];
  };
};

```

p.s. sorry, cant stop yapping 😛

edit2: btw nobody mentioned this?

[`nixpkgs.config.enableParallelBuildingByDefault`](https://nixos.org/manual/nixpkgs/unstable/#opt-enableParallelBuildingByDefault)

this is literally `enableParallelBuilding`, but for the entire system lol

edit3 (2026 feb): OOOH check this out

[https://wiki.nixos.org/wiki/Distributed\_build](https://wiki.nixos.org/wiki/Distributed_build)

i have NO idea why this never appeared in my search results, ffs. this is exactly what i was looking for LOL! this is still not the solution, though, cos i still have a few more questions (sorry): are there any… drawbacks (?) from compiling for/on not-original-hardware? like, for example, you download some binary for the correct architecture/platform, but then it doesnt work or its performance is unusually slow, just because it wasnt built on specifically your machine? you know what i mean? not sure if this kind of situation has a name? i guess, what im trying to say is, how to _make sure_ that what i am about to compile will work _hardware-insensitive(ly)?_

should i even worry about any of this stuff orrr… i dunno, theres just so many build flags and arguments, im just curious if nixpkgs themselves are built utilising some of this… [oh, wait, nvm](https://discourse.nixos.org/t/enable-specific-architecture-ie-zen4-support-within-a-nixos-system/41608)

edit4 (a few months later): oh. so thats what that is! yeah, i knew this, pft, obviously

> **[Best-effort delivery](https://en.wikipedia.org/wiki/Best-effort_delivery)**
>
> Best-effort delivery describes a network service in which a network does not provide any guarantee that data is effectively delivered or that delivery meets any quality of service. In a best-effort network, all users obtain best-effort service. Under best-effort, network performance characteristics such as transmission speed, network delay and packet loss depend on the current network traffic load, and the network hardware capacity. When network load increases, this can lead to packet loss, retra...

---

_[View the full topic](https://discourse.nixos.org/t/i-o-cpu-scheduling-jobs-cores-and-performance-baby/66120)._
