I see in docker sources for cpu calculation but I don't get what are exactly
- TotalUsage
- SystemUsage
- PercpuUsage
why is cpuDelta divided by SystemDelta and also why then multiplied by PercpuUsage?
The documentation says for cpuDelta
// calculate the change for the cpu usage of the container in between readings
and for systemDelta:
// calculate the change for the entire system between readings
so shouldn't these delta's both be summed and divided by the total cpu (or total nanoseconds passed) during that delta time? after all the container was consuming both the cpuDelta and also systemDelta
Update: I think I get it the totalUsage is the container usage and the SystemUsage is not the systemCPU used by the container but the whole system beyond the container cpu this is why they are divided.