Docker on Ubuntu can’t saturate CPU

Please don’t get excited (or flame me) – this is not the answer – I just need more space than a comment will allow! I am not a linux or Docker expert but I really like this sort of problem and have done some research over the weekend and have a few avenues to explore that may help. I don’t have a test rig so have reached an impasse.

Theories so far “For Debian and Ubuntu…”:

  1. Docker is putting container and sub-processes into a cgroup that is
    being throttled in some way.

  2. The scheduler for the OS and the scheduler within the Docker
    container (systemd?) are in some way ‘fighting’ for the CPU and
    constantly displacing each other.

  3. The OS scheduler is treating (a) the Docker Container and (b) the
    app inside as separate competing resource requests and therefore
    giving each about 50%

  4. It seems to me that the RedHat flavours of linux have in some way
    ‘integrated’ docker (read “looked at what it does and tweaked their
    OS setup or Docker setup to be compatible”). What have they changed
    to do this? – it may be the thing that makes the difference.

  5. There is a strong push for not using Docker under RHEL 6 but instead
    to use RHEL 7+ – What did they change in RH between these versions
    wrt. the CPU scheduling that makes them so keen on using 7+?

What I’d look at next:

  • cgroup setup whilst running.
  • Contents of any limits.conf files
  • Differences in Docker config files between the version on RH and
    Ubuntu flavours.
  • (If I had time) see if Docker on RHEL 6 had the problem (as RHEL 7
    doesn’t)

Research:
https://goldmann.pl/blog/2014/09/11/resource-management-in-docker/
http://www.janoszen.com/2013/02/06/limiting-linux-processes-cgroups-explained/
https://github.com/docker/docker/issues/6791
https://github.com/ibuildthecloud/systemd-docker/issues/15
https://unix.stackexchange.com/questions/151883/limiting-processes-to-not-exceed-more-than-10-of-cpu-usage
http://linux.die.net/man/5/limits.conf
https://marketplace.automic.com/details/centos-official-docker-image
https://www.datadoghq.com/blog/how-to-monitor-docker-resource-metrics/
https://libraries.io/go/github.com%2Fintelsdi-x%2Fsnap-plugin-collector-docker%2Fdocker
https://serverfault.com/questions/356962/where-are-the-default-ulimit-values-set-linux-centos
https://www.centos.org/forums/viewtopic.php?t=8956
https://docs.mongodb.org/manual/reference/ulimit/
http://www.unixarena.com/2013/12/how-to-increase-ulimit-values-in-redhat.html

If none of this helps I apologise!

Leave a Comment