Hello, thank you for reviewing the patch. On Mon, Aug 26, 2024 at 10:43 AM Michal Koutný <mkoutny@xxxxxxxx> wrote: > The difference between the two metrics is in cputime.c: > index = (task_nice(p) > 0) ? CPUTIME_NICE : CPUTIME_USER; > > > Exposing this metric will allow load balancers to correctly probe the > > niced CPU metric for each workload, and make more informed decisions > > when directing higher priority tasks. > > How would this work? (E.g. if too little nice time -> reduce priority > of high prio tasks?) We can find what fraction of the task is being run as a nice process by dividing the two metrics (nice / user) and determining the fraction of niceness. When a high prio task comes into the load balancer and must decide where the task should be delegated to, the balancer can use how much of the task is nice as one factor in making the decision. The reverse is also true; host-level information in /proc/stat may indicate that a high percentage of CPU time is being used by nice processes, giving an illusion that all tasks within the host are running nice processes, when in reality, it is just one task that is using a lot of nice CPU time, and other tasks are running nonnice tasks. By including cgroup-level nice statistics, we can get a clearer picture and avoid overloading a host with too many high prio tasks. Like you suggested, this information can also help in re-prioritizing the processes, which may help high prio tasks become executed quicker. Thanks, Joshua