How to allocate RAM for VM


Recommended Posts

Hi there

 

I am not sure how the settings of RAM in the VM configuration must be set exactly. It has 2 values that I can set. Left: Initial Memory, Right: Max Memory. Well what does that mean exactly?

And can I look somewhere how much RAM a VM is currently using? Like at overview from dockers in advanced view.

 

Igrafik.thumb.png.83b315d9e6ba50110e156897cc1f4135.png

 

Thank you for advice.

Greg

Link to comment
11 hours ago, cracksilver said:

Hi there

 

I am not sure how the settings of RAM in the VM configuration must be set exactly. It has 2 values that I can set. Left: Initial Memory, Right: Max Memory. Well what does that mean exactly?

And can I look somewhere how much RAM a VM is currently using? Like at overview from dockers in advanced view.

 

Igrafik.thumb.png.83b315d9e6ba50110e156897cc1f4135.png

 

Thank you for advice.

Greg

So when you click on the ? up top, to display the page help.. it says this

For VMs where no PCI devices are being passed through (GPUs, sound, etc.), you can set different values to initial and max memory to allow for memory ballooning. If you are passing through a PCI device, only the initial memory value is used and the max memory value is ignored. For more information on KVM memory ballooning, see here.

And links to https://www.linux-kvm.org/page/FAQ#Is_dynamic_memory_management_for_guests_supported.3F

 

Which says 



A. KVM only allocates memory as the guest tries to use it. Once it's allocated, KVM keeps it. Some guests (namely Microsoft guests) zero all memory at boot time. So they will use all memory.

B. Certain guests (only Linux at the moment) have a balloon driver, so the host can have the guest allocate a certain amount of memory which the guest won't be able to use anymore and it can then be freed on the host. Ballooning is controlled in the host via the balloon monitor command.

 

So basically .. if you're running a Windows VM it will automatically assign the "max" memory.  If you were running a Linux VM and set the initial memory to 8GB and the max to 16GB, then it would initially use 8GB when it starts up and as needed it would expand to 16GB.  That's my understanding.  Does it work in practice?  Don't know.

 

In your picture you are giving the VM 20GB of RAM.  Depending on what the VM is and what you are doing, you may not need that much.  And how much RAM does your Unraid server have?  This is not a fictional number for the VM.. it uses your Unraid RAM... so if you have 16GB of RAM in your system, setting it to 20 will most likely be some kind of problem.

 

 

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.