Skip to content

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

@MopigamesYT

Description

@MopigamesYT

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions