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

Limit container CPU and memory usage #21

Open
albertofaria opened this issue Mar 1, 2024 · 1 comment
Open

Limit container CPU and memory usage #21

albertofaria opened this issue Mar 1, 2024 · 1 comment

Comments

@albertofaria
Copy link
Member

We currently launch a container without CPU or memory limits, and trust libvirt and QEMU to do the right thing. We should instead set actual limits on the container.

One difficulty is that, since the limits specified by the user (using --cpu, --memory, etc.) apply to the VM and not the container, we must set a higher memory limit than requested on the container to account for QEMU memory requirements. The KubeVirt project has solved the same problem by estimating that overhead (see GetMemoryOverhead()). We could follow a similar approach.

@rhatdan
Copy link
Member

rhatdan commented Mar 1, 2024

SGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants