Docker Community Forums

Share and learn in the Docker community.

Docker + Kubernetes: hyperkit CPU

(Planetf1) #1

I have installed docker Version 17.12.0-ce-rc2-mac41 (21193) on the edge channel, which comes with kubernetes

I am using MacOS 10.13.3 beta 1 (understand support, this could be a factor). I’m running on a 2016 macbook pro 15

The first thing I noticed is that with only docker+kubernetes running, there is a noticeable ongoing background cpu load. This is without having any user containers/pods active. hyperkit is taking around 25-30% cpu - this seems to continue long-term even once things are stable

09:59 $ docker images
REPOSITORY                                               TAG                 IMAGE ID            CREATED             SIZE
<none>                                                   <none>              3a253f0d8c18        4 weeks ago         587MB
rangerdocker_mariadb                                     latest              7d1b12e78fbe        4 weeks ago         448MB
mariadb                                                  latest              abcee1d29aac        4 weeks ago         396MB
kamoulox/compose-controller                              v0.1.2              6480f70f7ac6        4 weeks ago         37.9MB
ubuntu                                                   latest              dd6f76d9cc90        5 weeks ago         122MB            v1.8.2              6278a1092d08        7 weeks ago         194MB   v1.8.2              5eabb0eae58b        7 weeks ago         129MB            v1.8.2              b48970f8473e        7 weeks ago         54.9MB                v1.8.2              88e2c85d3d02        7 weeks ago         93.1MB           1.14.5              fed89e8b4248        2 months ago        41.8MB          1.14.5              512cd7425a73        2 months ago        49.4MB     1.14.5              459944ce8cc4        2 months ago        41.4MB
anaconda_with_spark                                      v3                  d1f0bc2d574b        2 months ago        8.64GB
rstudio-server                                           v2                  e9f71f2ef29a        2 months ago        2.3GB
sandbox-hdp                                              latest              c3cef4760133        4 months ago        12.2GB                      3.0.17              243830dae7dd        9 months ago        169MB                     3.0                 99e59f495ffa        19 months ago       747kB
✔ /Library/Logs/DiagnosticReports 
10:50 $ docker ps
CONTAINER ID        IMAGE                                                    COMMAND                  CREATED             STATUS              PORTS               NAMES
c5595f837a7b        kamoulox/compose-controller                              "/compose-controller…"   2 minutes ago       Up 2 minutes                            k8s_compose_compose-64c876947c-qwwnr_docker_f9976364-e05b-11e7-ac10-025000000001_0
bdaee77a95ab           "/sidecar --v=2 --lo…"   2 minutes ago       Up 2 minutes                            k8s_sidecar_kube-dns-545bc4bfd4-mvjrs_kube-system_dcfac4a6-e05b-11e7-ac10-025000000001_0
3d32c2fef41a     "/dnsmasq-nanny -v=2…"   2 minutes ago       Up 2 minutes                            k8s_dnsmasq_kube-dns-545bc4bfd4-mvjrs_kube-system_dcfac4a6-e05b-11e7-ac10-025000000001_0
34f09b89fe34                "/usr/local/bin/kube…"   2 minutes ago       Up 2 minutes                            k8s_kube-proxy_kube-proxy-hsqkm_kube-system_dcf932ad-e05b-11e7-ac10-025000000001_0
6de5accbdefe          "/kube-dns --domain=…"   2 minutes ago       Up 2 minutes                            k8s_kubedns_kube-dns-545bc4bfd4-mvjrs_kube-system_dcfac4a6-e05b-11e7-ac10-025000000001_0
5d43522808ab                 "/pause"                 2 minutes ago       Up 2 minutes                            k8s_POD_kube-proxy-hsqkm_kube-system_dcf932ad-e05b-11e7-ac10-025000000001_0
ef8c82278ed5                 "/pause"                 2 minutes ago       Up 2 minutes                            k8s_POD_compose-64c876947c-qwwnr_docker_f9976364-e05b-11e7-ac10-025000000001_0
ea46c6ab8a53                 "/pause"                 2 minutes ago       Up 2 minutes                            k8s_POD_kube-dns-545bc4bfd4-mvjrs_kube-system_dcfac4a6-e05b-11e7-ac10-025000000001_0
e75c5e2f06ca            "kube-scheduler --ad…"   2 minutes ago       Up 2 minutes                            k8s_kube-scheduler_kube-scheduler-docker-for-desktop_kube-system_972d74c9fc2f4ebd8ab673058e386a65_0
fc166ae3fc11   "kube-controller-man…"   2 minutes ago       Up 2 minutes                            k8s_kube-controller-manager_kube-controller-manager-docker-for-desktop_kube-system_8fb2a9d14fc1cdac084f95f8513bd907_0
9a52c118b85b            "kube-apiserver --ad…"   2 minutes ago       Up 2 minutes                            k8s_kube-apiserver_kube-apiserver-docker-for-desktop_kube-system_cface09d1b5d77b2f65921df84325ddc_0
9140eda8734d                      "etcd --listen-clien…"   2 minutes ago       Up 2 minutes                            k8s_etcd_etcd-docker-for-desktop_kube-system_8cf2571a4c3f64cf3429d6f601861eec_0
25896a5e1e4f                 "/pause"                 2 minutes ago       Up 2 minutes                            k8s_POD_kube-scheduler-docker-for-desktop_kube-system_972d74c9fc2f4ebd8ab673058e386a65_0
0568e3739cca                 "/pause"                 2 minutes ago       Up 2 minutes                            k8s_POD_kube-controller-manager-docker-for-desktop_kube-system_8fb2a9d14fc1cdac084f95f8513bd907_0
e7e8ccecb934                 "/pause"                 2 minutes ago       Up 2 minutes                            k8s_POD_etcd-docker-for-desktop_kube-system_8cf2571a4c3f64cf3429d6f601861eec_0
7f6d1cc916d9                 "/pause"                 2 minutes ago       Up 2 minutes                            k8s_POD_kube-apiserver-docker-for-desktop_kube-system_cface09d1b5d77b2f65921df84325ddc_0
✔ /Library/Logs/DiagnosticReports

(Planetf1) #2

Still seeing this with yesterday’s update to 17.12.0-ce-rc3

(Planetf1) #3

I also logged on to the hyperkit vm docker created having tried

screen ~/Library/Containers/com.docker.docker/Data/com.docker.driver.amd64-linux/tty

And that was running at 1% cpu - nothing out of the ordinary though I did notice this large memory consumer
2349 2336 root S 10296m 256% 0 0% etcd --listen-client-urls=http://1
2349 root 2:18 etcd --listen-client-urls= --advertise-client-urls= --data-dir=/var/lib/etcd

This is with nothing being used, though the actual hyperkit proces is taking cpu ie

14:51 $ ps -ef | grep hyperkit
  501 57895 57891   0 11:10am ??        42:34.97 com.docker.hyperkit -A -u -F /Users/jonesn/Library/Containers/com.docker.docker/Data/com.docker.driver.amd64-linux/ -c 2 -m 4096M -s 0:0,hostbridge -s 31,lpc -s 1:0,virtio-vpnkit,path=/Users/jonesn/Library/Containers/com.docker.docker/Data/s50,uuid=08ba537d-d24a-477f-a183-b9dc5c4aa311 -s 2:0,ahci-hd,file:///Users/jonesn/Library/Containers/com.docker.docker/Data/com.docker.driver.amd64-linux/Docker.qcow2?sync=os&buffered=1,format=qcow,qcow-config=discard=true;compact_after_unmaps=262144;keep_erased=262144;runtime_asserts=false -s 3,virtio-sock,guest_cid=3,path=/Users/jonesn/Library/Containers/com.docker.docker/Data,guest_forwards=2376;1525 -s 4,ahci-cd,/Applications/ -s 5,ahci-cd,/Users/jonesn/Library/Containers/com.docker.docker/Data/com.docker.driver.amd64-linux/database.iso -s 6,virtio-rnd -s 7,virtio-9p,path=/Users/jonesn/Library/Containers/com.docker.docker/Data/s51,tag=port -l com1,autopty=/Users/jonesn/Library/Containers/com.docker.docker/Data/com.docker.driver.amd64-linux/tty,log=/Users/jonesn/Library/Containers/com.docker.docker/Data/com.docker.driver.amd64-linux/console-ring -f bootrom,/Applications/,,

(Rolf Neugebauer) #4

we are aware of this issue and track it internally. The amount of CPU taken varies from system to system and is only present when Kube is enabled. With Kube enabled a couple of fairly chunky containers are running and it is yet unclear if it is these containers taking up the CPU or interactions with HyperKit

(Linblo) #5

Any updates on this? I am seeing the exact same thing as @planetf1. Around 30% constant CPU load in MacOS, 1% in the hyperkit vm. controller_manager, apiserver followed by etcd being the the ones that stick out with a docker stats.
Really annoying, but it seems to be the same problem with minikube on VirtualBox and HyperKit.