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

[12.0-stable] pillar: Use hard memory limit for EVE memory management. #4306

Conversation

OhmSpectator
Copy link
Member

Backport of #4300

Previously, EVE referenced the soft memory limit
(memory.soft_limit_in_bytes) to determine available memory for VM creation. By default, the soft and hard memory limits were set to the same value, so this did not cause any issues. However, if the soft and hard limits are configured differently, EVE would not respect the hard memory constraints, allowing VMs to be created without adhering to the intended maximum memory limits.

This commit updates the EveMemoryLimitFile path to use the hard memory limit (memory.limit_in_bytes) instead of the soft limit. By doing so, EVE will now properly account for the hard memory restrictions when managing memory for containers and creating new VMs, preventing potential memory overcommitment when soft and hard limits differ.

Signed-off-by: Nikolay Martyanov [email protected]
(cherry picked from commit db4f3f3)

Previously, EVE referenced the soft memory limit
(`memory.soft_limit_in_bytes`) to determine available memory for VM
creation. By default, the soft and hard memory limits were set to the
same value, so this did not cause any issues. However, if the soft and
hard limits are configured differently, EVE would not respect the hard
memory constraints, allowing VMs to be created without adhering to the
intended maximum memory limits.

This commit updates the `EveMemoryLimitFile` path to use the hard memory
limit (`memory.limit_in_bytes`) instead of the soft limit. By doing so,
EVE will now properly account for the hard memory restrictions when
managing memory for containers and creating new VMs, preventing
potential memory overcommitment when soft and hard limits differ.

Signed-off-by: Nikolay Martyanov <[email protected]>
(cherry picked from commit db4f3f3)
@OhmSpectator OhmSpectator changed the title pillar: Use hard memory limit for EVE memory management. [12.0-stable] pillar: Use hard memory limit for EVE memory management. Sep 27, 2024
@OhmSpectator OhmSpectator added the bug Something isn't working label Sep 27, 2024
@OhmSpectator OhmSpectator merged commit 4856f73 into lf-edge:12.0-stable Sep 30, 2024
28 of 31 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants