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

[Feature]: Dynamic RAM allocation for Windows VM #751

Open
MopigamesYT opened this issue Sep 23, 2024 · 2 comments
Open

[Feature]: Dynamic RAM allocation for Windows VM #751

MopigamesYT opened this issue Sep 23, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@MopigamesYT
Copy link

Is your proposal related to a problem?

I'm always frustrated when the Windows VM uses all the allocated RAM even when it doesn't need it. For example, if I allocate 4GB of RAM to the VM, it uses all 4GB even if Windows only needs 2GB, wasting resources that could be used by other processes on my host system.

Describe the solution you'd like.

I'd like the RAM_SIZE parameter to act as a maximum limit rather than a fixed allocation. The VM should only use the amount of RAM it actually needs, up to the RAM_SIZE limit. Unused RAM should be released back to the host system. For instance, if RAM_SIZE is set to 4GB and Windows only needs 2GB, it should only use 2GB, leaving the other 2GB available for the host system.

Describe alternatives you've considered.

  1. Manually adjusting RAM_SIZE: This requires constant monitoring and container restarts, which is inconvenient.
  2. Using a smaller fixed RAM size: This could lead to performance issues when the VM occasionally needs more RAM.

Additional context

This feature would allow users to set a higher RAM_SIZE for peak usage without constantly reserving that amount, leading to more efficient use of system resources and improved overall system performance. It might involve changes to how QEMU and virtio-balloon are configured and managed within the container.

@MopigamesYT MopigamesYT added the enhancement New feature or request label Sep 23, 2024
@ornago
Copy link

ornago commented Oct 8, 2024

I'm running five of these windows containers simultaneously and it would be really nice, if they would share the RAM. With my Server having 32G of RAM installed, I can only allocate 10G for my containers. Is there a workaround?

@lmargit
Copy link

lmargit commented Oct 12, 2024

About the " ...RAM_SIZE parameter to act as a maximum limit rather than a fixed allocation".
I think this is one of the features built-in of using windows in a docker instead of windows in the traditional VM. Right?
You may compare the use of memory RAM in your Linux instance (host) using windows the traditional VM method vs the Dockur/windows method (Docker). Of course, same amount of RAM memory allocated to the Windows VM.

Or it is referring to change the amount of RAM memory inside the windows VM itself (on-the-fly)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

7 participants
@ornago @MopigamesYT @lmargit and others