On Linux processes have "nice" values ranging from -20 to 19. I wish I could assign even lower priority like 100 so that "background work" will yield as much as possible to other process but still enjoy all remaining CPU time. How can I achieve this?
1 Answer
You could make use of cgroups for that one really low priority process. You can create a cgroup just for that one process (call it lowprio
or w/e) and use the cpu.shares
parameter to only allow it a certain share of CPU time. You can read more about this approach in, e.g., RHEL's Resource Management Guide.