containers / containers/crun-vm
Limit container CPU and memory usage
- Dominant language
- Rust
- Stars
- 268
- Forks
- 18
- PR merge metrics
- No merged PRs in 30d
Description
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()`](https://github.com/kubevirt/kubevirt/blob/f67d2698b001e87f589e4263c5491afdfe62aa7b/pkg/virt-controller/services/renderresources.go#L303)). We could follow a similar approach.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.