4 ms·
I tried out K3s (via Rancher Desktop) on my Mac, and was disappointed to discover that it would consume about 30% CPU while idle, enough to run the fan at maxim
by atombender 5y ago
I tried out K3s (via Rancher Desktop) on my Mac, and was disappointed to discover that it would consume about 30% CPU while idle, enough to run the fan at maximum speed. By "idle" I mean running absolutely no containers other than what's included in the base install.
The full version of Kubernetes has the same flaw, and is the curse of distributions like Minikube and Kind. While K3s is marketed as a lightweight Kubernetes distribution, it does not fix the idle CPU usage issue. The reason, from what I can tell, is that Kubelet relies on polling everything. It's not efficiently implemented because nobody has ever needed it to be.
That means that, just like Minikube and Kind, it's not really suitable as something to run on your desktop. Which is really unfortunate, because it's a great way to run system software (think Postgres or Redis) that's a share dependency among a team's apps.
- tommek4077 5y agoIt's the same on servers, just losing a lot of power and energy. But someone will tell you servers and energy are cheaper than capable devs and ops.
- mountainriver 5y agoIt’s the kubernetes reconciler pattern you’re seeing. It can’t completely idle but is incredibly fault tolerant
- atombender 5y agoWith no resources changing, there should be nothing to reconcile. There should be some chatter from node status updates, perhaps, but nothing else. It's just a suboptimal implementation that nobody has bothered to optimize, because running Kubernetes on a laptop has never been a priority.
- neurostimulant 5y agoOnly on mac though, because docker has extra overhead due to running on a vm there. I run kubernetes all the time in my linux desktop and it consume <5% cpu on idle, and that's with more than a dozen pods running in the background (postgres, postgis, mysql, redis, memcached, a bunch of django webapps, some test wordpress instances, multiple sftp instances, and a pihole instance). I got fed up with the performance on mac and tried using https://github.com/rancher/k3d https://github.com/rancher/k3d instead, which seems to cut the idle cpu usage by half.