Hey everyone,
I’ve been using TrueNAS with Docker and Incus (for both containers and VMs), and I think there’s room for improvement in CPU management. Right now, it seems like Docker can’t be isolated properly, and Incus doesn’t allow CPU reservation, which can lead to performance issues.
Would it be possible to add:
- Global CPU Isolation for Docker
- Instead of limiting CPUs per container, it would be great if we could set a global CPU limit for Docker.
- Maybe an option in the UI where we can choose which CPU cores Docker can use?
- This way, Docker wouldn’t interfere with Incus workloads or system processes.
- CPU Reservation for Incus (Containers & VMs)
- Right now, Incus allows CPU limits (limits.cpu), but there’s no way to reserve specific CPU cores.
- If we had a CPU reservation feature, we could make sure important workloads always have the CPU power they need.
- Maybe this could be integrated into the UI with a simple “CPU Reservation” checkbox when setting up an Incus container or VM?
- Better CPU Management Using systemd Slices
- If Docker and Incus workloads were properly grouped using systemd slices, they wouldn’t interfere with system performance.
- Something like:
System Processes (system.slice)
Docker (truenas-docker.slice) → CPU-isolated
Incus (truenas-incus.slice) → Can reserve CPUs
- This would prevent Docker from hogging resources and allow Incus workloads to run more predictably.
I feel like these changes would make TrueNAS more stable under heavy workloads and give users better control over CPU allocation.
What do you all think? Would this be useful for others? Are there any potential issues I might be missing?