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

Usability: Warn about too little memory in podman/docker virtual machine #88

Closed
fwilhe opened this issue Jul 3, 2024 · 5 comments
Closed
Labels
kind/enhancement Enhancement, improvement, extension

Comments

@fwilhe
Copy link
Member

fwilhe commented Jul 3, 2024

What would you like to be added:

Warn the user about probably too small memory capacity.

Why is this needed:

For everyone using the builder not on a native linux machine, one needs a virtual machine (or a remote host) to run linux containers via podman or docker.
Both podman and docker have solutions for this that take care of setting up a vm on the user's behalf.
The issue is that the default amount of memory they allocate is probably too small to build Garden Linux.
To the user, this will make the build fail in non-obvious ways.

Questions:

  • What is the recommended lower bound? 4GiB? 8GiB?
  • Is a simple print enough or should it be a prompt where the user explicitly needs to accept (via keypress or environment variable) that they want to continue despite little memory?
@fwilhe fwilhe added the kind/enhancement Enhancement, improvement, extension label Jul 3, 2024
@fwilhe
Copy link
Member Author

fwilhe commented Jul 3, 2024

ping @Akendo (I think you mentioned this as an issue)
@nkraetzschmar

@Vincinator
Copy link
Contributor

we could read available memory from /proc/meminfo and convert it for a check that we place for example here:

tune2fs -Q usrquota,grpquota,prjquota "$target"

@Vincinator
Copy link
Contributor

With regards to the threshold value for the warning message:
@nkraetzschmar mentioned, ideally 4GB should suffice. Maybe a cleanup step is broken somewhere.

@Vincinator
Copy link
Contributor

@fwilhe is this fixed by #89?

@fwilhe
Copy link
Member Author

fwilhe commented Jul 5, 2024

@fwilhe is this fixed by #89?

From a UX perspective I don't think so. I think it's good we set explicit limits and reduce memory usage where possible (thanks for that @nkraetzschmar), but if the build runs out of memory, the failure will still be non-obvious.

I don't know how easy we could implement a lower-bounds check for memory in the builder (might not be trivial or possible due to linux namespaces), but I'd prefer to keep this issue open until further investigation to decide if we can/want to improve this or not.

@fwilhe fwilhe closed this as completed Aug 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement Enhancement, improvement, extension
Projects
None yet
Development

No branches or pull requests

2 participants