Is it possible to use a storage disk (such as a USB drive) as RAM?

Posted on

Problem :

My motherboard (HP Pavilion s3000y) only supports 2GB of RAM max. Which means that I can only allocate 1GB for running VMs, and applications that use a lot of RAM are slow (such as games and Visual Studio).

Is it possible to use a storage disk such as a USB drive as RAM?

Or if not, can VirtualBox use a drive as RAM for VMs?

Solution :

Windows Vista and 7 support ReadyBoost which will use a fast USB drive as a cache for SuperFetch. This allows SF to work better on systems with limited RAM. This can help increase responsiveness of file I/O operations because the flash drive is much faster at 4K random read/writes than the HDD.

Better yet, get a SSD drive. A pagefile on an SSD is really fast and will improving paging operation speeds fairly significantly, but is in no way a replacement for more RAM.

BTW, have you attempted to install larger RAM than it the motherboard suggests that it can use? It’s possible that if you upgrade to the latest BIOS revision that you might be able to use larger chips, such as 2x2GB or 4x1GB (not sure how many RAM slots you have). It shouldn’t hurt to at least try a larger chip if you have one available.

Also, you should reduce the RAM allocation to your virtual machine to as little as is needed to run the VM. An XP guest can run in as little as 256MB or 384MB of RAM depending on what you’re using it for.

The reason that applications that use a lot of memory make the system slow is because that forces the system to use storage devices. What you are asking to do is what the system is already doing and the reason you are not happy. Unfortunately, the only solutions are to change your workload so it requires less memory or to add more memory.

Even if you were to do this, it would not be recommended. USB drives/Hard Drives are extremely slow. Think about your USB Drive. It will transfer at a MAX of 60MBps. The ram in your computer based on your other question will run anywhere from 4200MBps to 5333MBps!

That is why when your computer is low on memory that it will use your Pagefile to allocate memory as Virtual Memory. Your hard drive light will go crazy and your computer will slow down greatly. It ran out of physical memory and in efforts to not crash, it will use your hard drive as virtual memory. Just think of how slow the computer is at that point and just think how horrible your VM will run if it is always using this RamDisk (see below) or virtual memory.

enter image description here

Yes, the name is “virtual memory” or “swapping”; it has been in regular use on personal computers for a very long time (first found in the 1960s, and ever since 1990s all mainstream OSes have them and turned them on by default). You might be able to improve performance marginally by tweaking the size of virtual memory (how to for vista), although it probablyy wouldn’t improve performance by much.

In general a virtual memory only improve performance in situations where your computer will not be able to handle the memory load otherwise, e.g. in situation where your system starts to go awry because they get OOM-killed by the OS.

Leave a Reply

Your email address will not be published. Required fields are marked *