Kubernetes: High CPU usage

10/16/2019

I am using Rancher. I have deployed a cluster with 1 master & 3 worker nodes. All Machines are VPSes with 2 vCPU, 8GB RAM and 80GB SSD.

After the cluster was set up, the CPU reserved figure on Rancher dashboard was 15%. After metrics were enabled, I could see CPU used figures too and now CPU reserved had become 44% and CPU used was 16%. I find those figures too high. Is it normal for Kubernetes a cluster to consume this much CPU by itself?

enter image description here

enter image description here

Drilling down into the metrics, if find that the networking solution that Rancher uses - Canal - consumes almost 10% of CPU resources. Is this normal?

enter image description here enter image description here

Rancher v2.3.0 User Interface v2.3.15 Helm v2.10.0-rancher12 Machine v0.15.0-rancher12-1

enter image description here

-- Dojo
cluster-computing
docker
kubernetes
rancher

1 Answer

10/16/2019

This "issue" is known for some time now and it affects smaller clusters. Kuberenetes is very CPU hungry relative to small clusters and this is currently by design. I have found multiple threads reporting this for different kind of setups. Here is an example.

So the short answer is: yes, Kubernetes setup consumes these amounts of CPU when used with relative small clusters.

I hope it helps.

-- OhHiMark
Source: StackOverflow