-
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
fix insufficient memory issues #11030
Conversation
cmd/minikube/cmd/start_flags.go
Outdated
@@ -96,7 +96,7 @@ const ( | |||
waitTimeout = "wait-timeout" | |||
nativeSSH = "native-ssh" | |||
minUsableMem = 1800 // Kubernetes (kubeadm) will not start with less | |||
minRecommendedMem = 1900 // Warn at no lower than existing configurations | |||
minRecommendedMem = 2048 // Warn at no lower than existing configurations |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to fix this, because the value is also used for looking at the available memory inside the VM...
So we should be using 2048 MiB on the "outside", but look for at least 1700 MiB on the "inside"
// ControlPlaneNumCPU is the number of CPUs required on control-plane
ControlPlaneNumCPU = 2
// ControlPlaneMem is the number of megabytes of memory required on the control-plane
// Below that amount of RAM running a stable control plane would be difficult.
ControlPlaneMem = 1700
There is a force flag to run it it anyway, but we should do the complaint (the same as kubeadm)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
agree with anders, I think we should not bump this, but check fo the outter VM memory
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
plus on docker driver on linux with cgroup v2 the memory limit is being ignored, so this PR doesnt change much
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the focus of this pr was to eliminate tests flake due to insufficient memory errors - shall i just remove this change then and leave the changes in how much memory tests allocate?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i've reverted this specific change as it's irrelevant for the specific issue it tries to solve for flake tests and should be instead addressed under a separate issue/pr
We should remove the current constants, and provide two new ones. Also need to clear up the MB vs MiB confusion... When I run the regular VM (with the minimum 2048 MiB), I get 1985 MiB total - as reported by the
Checking for 1700 or 1800 doesn't matter, but 1900 can have some false positives* (and there is much less available) * I think some of the cloud images ended up with like 1892 (for 2 GiB VM), but that shouldn't need any user concern VBoxManage showvminfo minikube qemu-img info ~/.minikube/machines/minikube/disk.vmdk |
I opened #10808 to provide some better documentation on the requirements Like #10808 (comment)
|
We should definitely use --memory 2048, my comment was about the code |
@afbjorklund thanks for your comments! would you agree then with this pr - to fix the flaking tests (focusing on --memory 2048) due to the lack of memory and clear that one out, and we can have a separate pr to better handle customer user mem params, proposed min memory (for different envs) in line with your #10808? |
Yes, changing the VM to use --memory=2048 can be done any time. The other is more of a backlog item. |
great, thanks! |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: medyagh, prezha The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
fixes #11029
examples and oom issue details are given in the description of the original issue #11029
proposed solution: increase (recommended) min memory to 2048 MiB