-
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
hyperv: Default to disabling dynamic memory (--hyperv-disable-dynamic-memory to driver) #1766
Comments
@DenisBiondic Having dynamic memory turned off or at least making it configurable would definitely help resolve some issues we are seeing with the Hyper-V driver. That would be great if you could send PR for this, thanks! |
@aaron-prindle will try to do it in the next few days |
The problem I was that the default setting for dynamic memory is the uncapped maximum amount. Over a couple days Hyper-V would suck up 20GB+ of RAM in to 'Driver Locker' even though the minicube was only using less than 2MB. Setting a sensible max amount for dynamic memory fixed that for me. (Windows 10 version 1703). I guess turning it off is the alternative fix! |
@aaron-prindle could you give me some pointers for where the relevant code for configuring powershell flags for Hyper V is? I never did anything in Go, I will try to go through some tutorials in the meantime to try to understand the structure better... |
@DenisBiondic While the VM is stopped (or before it's started you can use the following PowerShell command to set the dynamic memory flag.
or
https://docs.microsoft.com/en-us/powershell/module/hyper-v/set-vmmemory?view=win10-ps |
I am not sure I consider this as a feature and more of a bug fix. You cannot currently use Hyper-V without disabling Dynamic Memory. That seems like a bug to me. That being said the Docker-For-Windows Hyper-V VM disables Dynamic Memory when it is booted. Seems that minikube should follow suit and do the same thing |
Agreed on this - Bumping for now! |
Hello everyone, I'm not very experienced in Go but I think I've implemented the changes, however rather embarrassingly not sure how to build this on a Windows machine. |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
/remove-lifecycle stale I think this is wrongly labeled as a feature request. I think it bug and AFAIK not fixed? |
The required changes were made to upstream Docker Machine but not yet wired up to Minikube, there has been some questions around what the team want to do with the docker machine dependency otherwise I'm ready to implement |
I disabled DynamicMemory with this change:
Then I recompiled with this (using Git Bash on Windows)
Edit* For some reason, I would get this warning while building:
But if I start bash instead, then run the make command from inside, that doesn't happen: $ MSYS_NO_PATHCONV=1 docker run -it --rm -v "$(pwd)":/go/src/k8s.io/minikube -w /go/src/k8s.io/minikube golang:stretch /bin/bash
root@d7305eb27c46:/go/src/k8s.io/minikube# make cross
GOPATH=/go ./makedepend.sh out/docker-machine-driver-kvm2 k8s.io ./cmd/drivers/kvm/ > out/docker-machine-driver-kvm2.d
...
out/minikube-windows-amd64 k8s.io/minikube/cmd/minikube
cp out/minikube-windows-amd64 out/minikube-windows-amd64.exe |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
/remove-lifecycle stale |
I'd never heard of dynamic memory before, but read up a little on it: I don't know much about HyperV, but I would definitely be happy to help someone implement this if they want to tackle it. It seems like the --hyperv-disable-dynamic-memory option is supported already by the hyperv driver: Does someone mind taking this on? |
specifically hammering |
This is now fixed at head, and will be part of the next minikube release. |
Is this a BUG REPORT or FEATURE REQUEST?
Feature Request
Minikube version v0.20.0
Environment:
Couple of issues already point out to problem with Hyper-V and dynamic memory:
1252 & 1762
Would it not be better to start the Hyper-V machine with dynamic memory turned off? Currently this switch in not given in to Powershell configuration, but it would be a simple thing to do:
-DynamicMemoryEnabled $true --- check here: https://technet.microsoft.com/en-us/itpro/powershell/windows/hyper-v/set-vmmemory
I would be happy to send a pull request for this.
The text was updated successfully, but these errors were encountered: