You are not logged in.

#1 2010-05-29 04:13:22

Japanlinux
Member
Registered: 2010-05-18
Posts: 173

Virtual Machine RAM assignments

I have been using Virtualbox on Arch for a bit now, and everything works okay. I decided to assign a bit more ram to VB because some programs I use on Windows in VB really needed the extra bit. Then a thought came about. Is there a way to have dynamic RAM assignment for VB? As in, if I have 1 gb of Ram on the host. VB is using 300mb of that. in VB, a program I am using caps the RAM and begins running slowly because there is no extra ram left. Is there  a way to get VB to pull in more RAM from the host, if it is available. So the VB would use 400mb while that program demands it, then when the program is closed, VB returns that borrowed RAM and shifts back to assigned 300mb of ram?

Also, if VB cannot do this, but vmware or another emulator can, please let me know, as I'll try out the other one.

EDIT: Perhaps to make it simpiler to understand, I would like VB to work like a regular program. It uses only the Ram it needs at any given time, rather than assigning x amount to VB, making that x unavailable in linux, even if VB is only using 1/3 of it's assigned amount. So is there a virtual machine that follows this type of thinking?

EDIT 2: I stumbled upon HP's virtual machine (though I can't use it, it had a good description of what I want).

Integrity VM allows you to dynamically modify the memory that the virtual machine can use.

Normally, guests use a fixed amount of memory. That memory is allocated when the virtual machine is started and locked down so it cannot be paged or swapped. Once the memory is locked down, the VM Host cannot make it available to other virtual machines. Therefore, the VM Host supports a fixed number of virtual machines based on the amount of memory in the VM Host system and the number and size of the virtual machines.
Dynamic memory is an optional feature of Integrity VM that allows you to change the amount of physical memory in use by a virtual machine without rebooting the virtual machine. In this release of Integrity VM, dynamic memory is available on HP-UX guests only

Last edited by Japanlinux (2010-05-29 12:20:13)

Offline

#2 2010-05-29 15:01:12

xvello
Member
Registered: 2010-05-15
Posts: 81
Website

Re: Virtual Machine RAM assignments

Hello

For this to work, one needs the guest operating to accept variations on available memory capacity. That's why the Integrity VM description you quoted says "dynamic memory is available on HP-UX guests only".
This should be doable on linux guests (as they support memory hotplug), but I doubt a windows guest might work with this.

FWI, the memory setting in VirtualBox is a maximum quantity. If the guest OS doesn't use it, then the memory will still be available to the host OS. Modern operating system tend to use all the available memory for disk cache (which is a good thing on a "real" machine). You might wanna look into disabling this behavior in the guest OS (I don't know if it's possible on windows) and set a high memory capacity. Then you can have higher memory available to applications when they need it, without the guest OS using it for caches.

Cheers

Offline

Board footer

Powered by FluxBB