CPU/Mem Stats compatibility for Podman with cgroup v2#93
CPU/Mem Stats compatibility for Podman with cgroup v2#93gorynychzmey wants to merge 2 commits intoualex73:masterfrom
Conversation
Podman's realisation of Docker API uses cpuacct for per_cpu and online_cpus, which are only available with cgroup v1.
|
Question, you added a new "if "stats" in raw["memory_stats"]:" for the version1904 code. Now that "stats" must exist before that part of the code will be executed, what is the scenario where that will happen? If it is for podman, then we should add some code to get the correct "cache" value (with the new code, it is set to 0) |
|
As I understood, cgroup v2 doesn't report cache stats at all, or at least Podman API realisation with cgroup v2 doesn't report it, The previous code assumed that cgroup v2 seems to be general less reportive as v1, but I would like to have container stats at least partially without need to set up older version of cgroup. I said "partially" because f.e. Podman API assumes |
|
I tested these fixes on a Podman install and I see far less errors now. I was seeing errors every few seconds before and now I just get an occasional |
Podman's realisation of Docker API uses cpuacct for
per_cpuandonline_cpus, which are only available with cgroup v1.Also Podman realisation of Docker API with cgroup v2 doesn't provides
memory_stats.stats.