0

I have a Windows 7 64 bit with lots of RAM hosting a VirtualBox VM with a Windows XP guest. The apps run on the guest use so much ram that it typically ends up swapping.

I'd like to know any tips for configuring the guest or host so that the guest gets best use of the hosts RAM as a disk cache (particularly for the swap file?)

In particular, is there any way to get the Win 7 host to use most of its RAM as a disk cache (or will it do that anyway)?

Should I change any settings in the XP guest to run well in this environment?

2
  • 1
    How much memory does your Windows 7 machine have? How much memory do your virtual xp box have, are you running more than one virtual host? How much RAM does your applications require? Add more memory is the simple answer.
    – Nixphoe
    Sep 29, 2011 at 0:26
  • @Nixphoe -- The Windows 7 machine has 16 GB; I've given 4 GB to the guest (the maximum Win XP 32 can use). The Windows XP guest application load ends up using 6 or 7 GB of virtual memory.
    – antlersoft
    Sep 29, 2011 at 3:44

1 Answer 1

1

I think that you're confused about how VirtualBox (or any other VMM or hypervisor) software works with a Windows guest.

There are two file systems, the one for the host and the one for the guest. The host doesn't see guest files as they are read or written, only blocks in the virtual hard disk file(s). So the host file system can't really cache those files.

It could cache the blocks of the virtual hard disk, but the guest OS is already doing that. So most designers of virtualization systems (VMMs and hypervisors) choose not to use that RAM twice, prefering to make the guest's virtual disk files uncached in the host.

If you want the guest to do less swapping, give it more memory.

1
  • The guest is Win XP 32 and can only handle 4 GB of RAM, which I'm giving it. I'd like it to be able to take advantage of the 16 GB in the host for disk caching (or some other way.) With VirtualBox, you can choose to turn host caching on or off.
    – antlersoft
    Sep 29, 2011 at 3:46

Not the answer you're looking for? Browse other questions tagged .