Skip to content
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

Warn about default Docker Desktop resources #7980

Closed
medyagh opened this issue May 2, 2020 · 9 comments
Closed

Warn about default Docker Desktop resources #7980

medyagh opened this issue May 2, 2020 · 9 comments
Labels
co/docker-driver Issues related to kubernetes in container kind/documentation Categorizes issue or PR as related to documentation. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. needs-solution-message Issues where where offering a solution for an error would be helpful os/macos os/windows priority/backlog Higher priority than priority/awaiting-more-evidence.

Comments

@medyagh
Copy link
Member

medyagh commented May 2, 2020

on a fresh windows machine with 32 GB ram and 8 CPus I installed docker-desktop with all default settings,

I noticed a painfully slower than normal minikube significantly (I dont know how to time commands in powershell)

then I noticed docker desktop by default only has 2 GB ram, no matter what your system is.

We need to
1- Detect the docker desktop resources
2- Warn the user to Increase if possible

Screen Shot 2020-05-02 at 4 28 24 PM

@medyagh medyagh changed the title warn about low docker-desktop ram warn about Default Docker Desktop Resources May 2, 2020
@afbjorklund afbjorklund added co/docker-driver Issues related to kubernetes in container os/windows needs-solution-message Issues where where offering a solution for an error would be helpful priority/backlog Higher priority than priority/awaiting-more-evidence. labels May 3, 2020
@afbjorklund
Copy link
Collaborator

I thought minikube was supposed to be able to run in a 2GB virtual machine ?
But maybe we beefed that up to 2200M now, and it started swapping on you...

Were you able to log in to the machine, and see what is using the most memory ?
It seems rather sad that we can't even install an empty cluster without 2+ GiB.


The documentation is a bit vague, if it is the VM that needs 2G or if it is Kubernetes.

https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/

But it does seem to say that it is the machine, and that it leaves room for apps ?

2 GB or more of RAM per machine (any less will leave little room for your apps)

So if the kubeadm documentation is not accurate for newer Kubernetes versions,
it should probably be updated upstream. To require 2200M or whatever (8000M?).

🔥 Creating docker container (CPUs=2, Memory=8000MB) ...

Do you know if the situation is the same in the Docker-for-Mac VM ?

@afbjorklund
Copy link
Collaborator

Do you know if the situation is the same in the Docker-for-Mac VM ?

Never mind, it seems to be identical: https://docs.docker.com/docker-for-mac/#resources

@afbjorklund afbjorklund added os/macos kind/documentation Categorizes issue or PR as related to documentation. labels May 3, 2020
@afbjorklund
Copy link
Collaborator

Linux

The 8G default was when using Docker Engine, running on Ubuntu (with same 32 GB RAM)

Using suggested 8000MB memory alloc based on sys=32047MB, container=32047MB

There is no VM, so Docker has access to all of it. So the limit comes from minikube here:

        // Suggest 25% of RAM, rounded to nearest 100MB. Hyper-V requires an even number!
        suggested := int(float32(sysLimit)/400.0) * 100

docker info

 OSType: linux
 Architecture: x86_64
 CPUs: 8
 Total Memory: 31.3GiB

@afbjorklund afbjorklund changed the title warn about Default Docker Desktop Resources Warn about default Docker Desktop resources May 3, 2020
@afbjorklund
Copy link
Collaborator

OpenShift

As a comparison, minishift4 ("CodeReady Containers") now requires 8 GB of memory:

https://developers.redhat.com/blog/2019/09/05/red-hat-openshift-4-on-your-laptop-introducing-red-hat-codeready-containers/

CodeReady Containers requires the following minimum system resources to run Red Hat OpenShift:

4 virtual CPUs (vCPUs)
8 GB of memory
35 GB of storage space

Minikube (VM/BM)

So maybe it is time to increase the minikube requirements to 4 GB of memory now ?

Perhaps also increase the default disk image size too, from 19.53 GiB to 39.06 GiB.

https://minikube.sigs.k8s.io/docs/start/

What you’ll need

  • 2 CPU (not documented)
  • 2GB of free memory
  • 20GB of free disk space

Or we could do like the games:

"Minimum" vs. "Recommended"


For minishift3, I think it was rather similar to the minikube requirements.

Which in turn is twice the amount of the docker-machine requirements...

@afbjorklund
Copy link
Collaborator

Also related to #3574 - minikube should be able to warn you when the VM is runnnig low...

@medyagh
Copy link
Member Author

medyagh commented May 5, 2020

the thing is, minikube runs with 2 GB ram, but super slow ! most users don't notice that docker desktop was installed by default with 2 GB ram

@afbjorklund
Copy link
Collaborator

the thing is, minikube runs with 2 GB ram, but super slow ! most users don't notice that docker desktop was installed by default with 2 GB ram

It should run (at least "idle") on the default memory allocation, without swapping ("super slow"). Before, we have only added swap when running on 1 GB ram, and is not really recommended or supported.

Note that kubeadm does not support using swap at all, as it leads to issues when orchestrating.
[ERROR Swap]: running with swap on is not supported. Please disable swap

But will move the general discussion to a new issue, I think. It's bigger than "just" Docker VM...

I think it would make sense to make it the new "performance" goal (a memory usage analysis) ?

@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Aug 5, 2020
@fejta-bot
Copy link

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle rotten

@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Sep 4, 2020
@medyagh medyagh closed this as completed Sep 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
co/docker-driver Issues related to kubernetes in container kind/documentation Categorizes issue or PR as related to documentation. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. needs-solution-message Issues where where offering a solution for an error would be helpful os/macos os/windows priority/backlog Higher priority than priority/awaiting-more-evidence.
Projects
None yet
Development

No branches or pull requests

4 participants