stats/v1: export per-cgroup stats#100
Conversation
The cgroupstats provides information from taskstats which help us to know how `busy` tasks in one cgroup are right now. With Metric API in shim, it can enhance monitor capability. For more information: * https://github.com/torvalds/linux/blob/master/include/uapi/linux/cgroupstats.h * https://www.kernel.org/doc/Documentation/accounting/cgroupstats.txt * https://www.kernel.org/doc/Documentation/accounting/taskstats.txt Signed-off-by: Wei Fu <[email protected]>
Codecov Report
@@ Coverage Diff @@
## master #100 +/- ##
=======================================
Coverage 45.42% 45.42%
=======================================
Files 23 23
Lines 1638 1638
=======================================
Hits 744 744
Misses 768 768
Partials 126 126Continue to review full report at Codecov.
|
|
So these stats are provided via a netlink socket? |
Yes. It seems efficient I think. |
|
Where is the implementation going to come from? the Shims? |
Yes. It is for kata container. We put the collector in the agent. It will export the data through Mertic Shim API. |
|
We decide to use metric-server get load information instead of using cadvisor(we make runc and kata provide load information, and passed by shim metric interface). So add a interface in containerd/cgroup libbrary. |
|
LGTM |
full diff: containerd/cgroups@c4b9ac5...5fbad35 - containerd/cgroups#82 Add go module support - containerd/cgroups#96 Move metrics proto package to stats/v1 - containerd/cgroups#97 Allow overriding the default /proc folder in blkioController - containerd/cgroups#98 Allows ignoring memory modules - containerd/cgroups#99 Add Go 1.13 to Travis - containerd/cgroups#100 stats/v1: export per-cgroup stats Signed-off-by: Sebastiaan van Stijn <[email protected]>
full diff: containerd/cgroups@c4b9ac5...5fbad35 - containerd/cgroups#82 Add go module support - containerd/cgroups#96 Move metrics proto package to stats/v1 - containerd/cgroups#97 Allow overriding the default /proc folder in blkioController - containerd/cgroups#98 Allows ignoring memory modules - containerd/cgroups#99 Add Go 1.13 to Travis - containerd/cgroups#100 stats/v1: export per-cgroup stats Signed-off-by: Sebastiaan van Stijn <[email protected]> Upstream-commit: 27552ceb15bca544820229e574427d4c1d6ef585 Component: engine
full diff: containerd/cgroups@c4b9ac5...5fbad35 - containerd/cgroups#82 Add go module support - containerd/cgroups#96 Move metrics proto package to stats/v1 - containerd/cgroups#97 Allow overriding the default /proc folder in blkioController - containerd/cgroups#98 Allows ignoring memory modules - containerd/cgroups#99 Add Go 1.13 to Travis - containerd/cgroups#100 stats/v1: export per-cgroup stats Signed-off-by: Sebastiaan van Stijn <[email protected]> (cherry picked from commit 27552ce) Signed-off-by: Sebastiaan van Stijn <[email protected]>
full diff: containerd/cgroups@c4b9ac5...5fbad35 - containerd/cgroups#82 Add go module support - containerd/cgroups#96 Move metrics proto package to stats/v1 - containerd/cgroups#97 Allow overriding the default /proc folder in blkioController - containerd/cgroups#98 Allows ignoring memory modules - containerd/cgroups#99 Add Go 1.13 to Travis - containerd/cgroups#100 stats/v1: export per-cgroup stats Signed-off-by: Sebastiaan van Stijn <[email protected]> (cherry picked from commit 27552ceb15bca544820229e574427d4c1d6ef585) Signed-off-by: Sebastiaan van Stijn <[email protected]> Upstream-commit: 9ab162a73ac9e133a21cffbadd3339cbb5213939 Component: engine
The cgroupstats provides information from taskstats which help us to
know how
busytasks in one cgroup are right now. With Metric API inshim, it can enhance monitor capability.
For more information:
Signed-off-by: Wei Fu [email protected]