Now Reading
Linux 6.6 Allows Monitoring Per-CPU Cgroup CPU Utilization Stats

Linux 6.6 Allows Monitoring Per-CPU Cgroup CPU Utilization Stats

2023-09-11 08:12:24


With the Linux 6.6 merge window the cgroup modifications introduced one change value mentioning.

With the brand new cgroup code in Linux 6.6, the per-CPU CPU utilization stats are actually being tracked.

As famous in final week’s cgroup merge to Linux 6.6 Git, the per-CPU CPU utilization stats are being tracked now and may be uncovered similar to by way of eBPF however not at the moment uncovered by way of the cgroupfs interface. In a future kernel launch the per-CPU utilization stats will hopefully be uncovered by way of cgroupfs as soon as an satisfactory interface has been agreed upon.

Intel Xeon Max CPUs

The patch in the course of the summer time offered extra perception into this per-CPU CPU utilization stats monitoring:

“Now the member variable bstat of the construction cgroup_rstat_cpu data the per-cpu time of the cgroup itself, however doesn’t embrace the per-cpu time of its descendants. The per-cpu time together with descendants could be very helpful for calculating the per-cpu utilization of cgroups.

See Also

Though we are able to not directly acquire the overall per-cpu time of the cgroup and its descendants by accumulating the per-cpu bstat of every descendant of the cgroup. However after a baby cgroup is eliminated, we’ll lose its bstat info. This can trigger the cumulative worth to be non-monotonic, thus affecting the accuracy of cgroup per-cpu utilization.

So we add the cumul_bstat variable to file the overall per-cpu time of this cgroup and its descendants, which is analogous to “cpuacct.utilization*” in cgroup v1. And that is additionally useful for the migration from cgroup v1 to cgroup v2. After including this variable, we are able to acquire the per-cpu time of cgroup and its descendants in person mode by way of eBPF, and so on.”

This cgroup contribution to the upstream kernel was carried out by Bytedance engineers.

Source Link

What's Your Reaction?
In Love
Not Sure
View Comments (0)

Leave a Reply

Your email address will not be published.

2022 Blinking Robots.
WordPress by Doejo

Scroll To Top