Using Virtual drive as ram

Here you can provide suggestions on how to improve the product, website, etc.
JBK
Posts: 1
Joined: 16. Aug 2018, 21:56

Re: Using Virtual drive as ram

Post by JBK »

tadajin wrote:i think the one biggest features that virtual box is missing that could make it a world-wide leader in operating system virtualisation is the ability to somehow create a virtual drive that can be used as ram (somethin like a linux or sun 'Swap Space')? this would result in faster speed for virtualised operating system, less strain on the computer hardware.
For discussion purposes: Still agree, all these many years later. 16GiB memory Laptop, 256GiB-SSD, 2TB-HD. i7-x86_64. Windows 10 (came with...). What's left of RAM after Windows takes its cut is what I have to create virtual machines. I have a ROCKS cluster lab on my laptop. And it's soooo close to perfect, were it not for memory limitations. Or rather, memory limited to physical ram for lack of ram virtualization at the virtualbox level (or Windows level). I'm not even worried about Windows lagging behind Linux at this point. I have a ROCKS head node at 4G base memory. Now I want to start adding compute nodes; at least 6. They are pxe booted and built during the install phase. Then after that they go to OS phase where they boot their local virtual HDD. For the install, the compute nodes must be 4GB. And I'd like to leave them that large anyway rather than lowering them afterward. 6 nodes times 4G is 24G which cannot come out of a 16G Windows system. The answer is to let the base memory of each VM be a combination of system ram from the OS and individual virtual-RAM-files on SSD (or HDD if that's all you have). I'd assign each guest VM to have 1GB base RAM + 3GB virtual-RAM-file on SSD for what would be considered 4GB BASE RAM. Six guests operating simultaneously would consume 6G base or real RAM, doable on my 16G Windows system; and 18G spread across six virtual-RAM-files on SSD, very doable. The swapping algorithm would ensure frequently access pages would tend to aggregate in the faster base RAM region, and the less frequently pages would aggregate in the relatively slower virtual-RAM-file on SSD region. This example suggested a 1:4 ratio but it could be 50:50 or some other, slider control. Many of these VMs taking up 24G on a 16G system may be quiescent most of the time waiting for work but are needed to be up and responding as part of the cluster. If they get slower as they get busy, it's understandable the compromise that must be made. But as long as having the configuration up and working is more valuable than having it be fast, we are good. Without this capability I am (1) forever reducing the base memory size of VMs until I worry they won't work, or (2) just not running all the VMs I would like to at a given time. And I am watching the Windows Performance monitor graph to make sure my VMs don't make the graph rise too close to 100% while cursing Windows' not being able to virtualize SSD into VRAM and having it to present to Virtualbox as more than the 16 real RAM on the system.
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Using Virtual drive as ram

Post by mpack »

No matter how hard you apply wishful thinking, the reality is no different now than it was back when the question was originally asked.

It's very simple: VirtualBox gives you a VM, not a simulator. The guest OS requires a real CPU and real RAM because the guest OS is what implements paged RAM and other frills of a modern OS, and the CPU needs physical RAM to do that. Do some research on how a CPU paging exception works.
Post Reply