Virtual Ram Pool for all running Guests

Here you can provide suggestions on how to improve the product, website, etc.
Post Reply
dEhiN
Posts: 9
Joined: 21. May 2010, 00:23
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Linux Mint Debian Edition 4, Debian 10, Debian GNU/Hurd
Location: Canada

Virtual Ram Pool for all running Guests

Post by dEhiN »

Hi all, I don't know if this has been discussed before, and if so, please let me know. Would it be possible to use some sort of virtual ram pool for all running guests? For example, I have 32 GB of RAM. While, that's a good amount, most OSes even as VMs will need bare minimum 4 GB, which only lets me run maybe 4 or 5 VMs concurrently at most alongside my Windows 10 host. But, those VMs aren't all necessarily using the full 4 GBs all the time. So, why do we have to dedicate a portion of the host RAM for each guest? Is this a limitation with RAM?

If you're wondering why I'm asking, my main reason for using VM at this point is to develop my tech skills via playing around with different OSes (mostly, different Linux distros). To this end, I have access to a copy of Windows Server 2019 through my college IT department, and I want to learn how to build a domain. I had the idea to at the same time get some experience setting up Linux servers as well, and maybe do something like have an internal network of all my VMs with the Windows Server as the domain controller and a Linux server as the DNS/DHCP/Firewall. But, to really see if things are working well, I'd like to be able to realistically run several VMs at once. (To give you an idea of what I mean by several, I currently have 13 VMs including the Windows Server. I generally run only 2 or 3 at one time, currently mostly to keep each OS up to date every so often.)

What do you guys think? Would a virtual RAM pool even make sense, leaving aside if it's possible. If it were possible, would it translate into the allowance of more simultaneous VMs while not sacrificing performance of either the host or any guest? Thanks in advance.
Host: HP EliteBook 8470p -- Windows 10 Pro -- 16 GB DDR3-1600 RAM -- 1 TB SATA-3 SSD -- Intel Dual-Core i5 3220M
Guest: VirtualBox 6.1.16 r140961 (Qt5.6.2) -- Linux Mint Debian Edition 4 -- 4 GB RAM -- 4 GB swap -- 100 GB /
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Virtual Ram Pool for all running Guests

Post by mpack »

VirtualBox already has a feature like that (memory ballooning).

Unfortunately it doesn't work well with Windows guests because the first thing they do on startup is check all the RAM, which causes all the RAM to be fully allocated (a bit like doing a surface write test on a dynamic virtual drive). I believe memory ballooning works better with Linux guests tho. Though frankly: the best possible solution is not to use resources you don't have, as that will always lead to fights.

p.s. In case you are assuming otherwise - VirtualBox usually can't use paged RAM for VMs. Among other reasons, guest OS's will fail if RAM timing does not behave as expected. VirtualBox provides physical RAM to the VM, and then the guest OS can implement a paged RAM model if it supports one.
Post Reply