Question relates to Linux cgroups cpu accounting.
I noticed this at the container level, but it persists up to top level. For instance:
# cat /sys/fs/cgroup/cpu/cpuacct.stat /sys/fs/cgroup/cpu/cpuacct.usage
user 34618
system 18038
743932863030
The units for the former are 100ths of a second and for the latter nanoseconds, i.e. 346.18, 180.38 and 743.932863030
My question is: why do the first two not add up to the latter?
You might think "ah, they start from a different origin", so here are the same metrics a few minutes later:
# cat /sys/fs/cgroup/cpu/cpuacct.stat /sys/fs/cgroup/cpu/cpuacct.usage
user 40028
system 22098
818501029494
The deltas are 54.1, 40.6 and 74.57.