lkml.org 
[lkml]   [2017]   [Feb]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
Subject"sched/cpuacct: Show all possible CPUs in cpuacct output" broke Docker CPU usage accounting
Hello,

It seems that the changes to cpuacct.usage(_percpu) in 5ca3726af7f6
("sched/cpuacct: Show all possible CPUs in cpuacct output") have
broken CPU usage accounting in Docker
(https://github.com/docker/docker/issues/28941).

The issue is the code at
https://github.com/docker/docker/blob/master/cli/command/container/stats_helpers.go#L184
which multiplies by the length of the array on those files which has
gone from being the number of online cpus to the number of possible
cpus, hence inflating the numbers.

I'm not entirely sure what the answer is, mainly because I've not been
able to figure out what the units presented in the cpuacct files are
which would justify multiplying by any version of number of CPUs,
although it does appear to have been (AFAICT) producing the correct
numbers with the old code.

I'm more than happy to code up a fix on whichever side of the boundary
is appropriate given a hint in the correct direction to take...

Thanks,
Ian.

\
 
 \ /
  Last update: 2017-02-15 13:35    [W:0.035 / U:2.200 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site