-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Disable swap within minikube VM #3012
Comments
swapoff makes sense to me. k8s has issues with swap in general. |
Swapoff will help as well |
Was discussed in #1827, before the bot closed it |
++
|
This issue seems like an easy win, so I'm testing a possible PR to address it: #3278. |
Upstream Kubernetes doesn't even officially support swap. I'm kinda surprised this was ever enabled. |
It was a requirement of Docker (for a while), and Minikube was based on Docker Machine... |
Removing the swap partition will potentially also make the machine disk image a lot smaller... For some drivers (KVM), formatting the 1000M swap partition (mkswap) increases the image too. The virtualbox driver seems to do slightly better, and recognizes the the sparse file storage ? |
FEATURE REQUEST
I tried to debug, why minikube is slow for all our team. What I noticed, that minikube has swapiness = 60, this means, it will use swap if it has < 60% memory left. Most host OS already have swapiness set (60 for linux). Currenly if minikube uses >800Mb memory or host OS has <40% memory free, it goes to swap. Host OS is not part of minikube project, but minikube OS is
Doing swapoff or setting swapiness to 10 makes minikube much faster
Please provide the following details:
Environment:
Minikube version 0.28.0 (use
minikube version
):cat ~/.minikube/machines/minikube/config.json | grep DriverName
):kvm2
cat ~/.minikube/machines/minikube/config.json | grep -i ISO
orminikube ssh cat /etc/VERSION
):What happened:
Minikube is extremely slow for our team (freezes whole UI)
What you expected to happen:
Make it not to freeze UI
How to reproduce it (as minimally and precisely as possible):
Run minikube with 72% memory usage. Then run htop/iotop on both host andVM
Output of
minikube logs
(if applicable):Anything else do we need to know:
The text was updated successfully, but these errors were encountered: