lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAF8ehsKSQW_T8afoeJm5P-u7i_svmMyPdbzUensi8GvjVqhNLQ@mail.gmail.com>
Date: Mon, 26 Aug 2024 12:13:13 -0400
From: Joshua Hahn <joshua.hahn6@...il.com>
To: Michal Koutný <mkoutny@...e.com>
Cc: tj@...nel.org, lizefan.x@...edance.com, hannes@...xchg.org, 
	shuah@...nel.org, cgroups@...r.kernel.org, linux-kernel@...r.kernel.org, 
	linux-kselftest@...r.kernel.org, Joshua Hahn <joshua.hahn6@...il.com>
Subject: Re: [PATCH 0/2] Exposing nice CPU usage to userspace

Hello, thank you for reviewing the patch.

On Mon, Aug 26, 2024 at 10:43 AM Michal Koutný <mkoutny@...e.com> 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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ