Page 1 of 1

Heavy swapping - Windows on Windows

Posted: 11. Oct 2012, 11:42
by MaryXYX
Host: Windows XP-64 with 12 GB of RAM
Guest: Windows XP-32 with 1 GB of RAM
Task manager on the host shows "virtualbox.exe" using 64860 KB memory and page thrashing so badly that the guest is not responding. The host has about 9 GB free. There is another "virtualbox.exe" using a smaller amount of memory and not paging heavily. When I have used VMware the guest RAM has all been allocated so there was no severe paging but I don't see how to force this on VirtualBox. I have searched for this problem and seem to see other people asking similar questions, but no answer.

Re: Heavy swapping - Windows on Windows

Posted: 11. Oct 2012, 12:51
by mpack
Shut down the VM and then post the VM a log file please, as a zipped attachment. The VM log file is called "VBox.log", and can be found in the "Logs" subfolder of your VM folder.

Re: Heavy swapping - Windows on Windows

Posted: 12. Oct 2012, 00:50
by MaryXYX
Thanks for responding. Just got around to it ...

Re: Heavy swapping - Windows on Windows

Posted: 12. Oct 2012, 12:55
by mpack
Hmm. That log file (which incidentally is not the file I asked for) shows nothing significant that I can see.

VM have all the RAM they will ever use allocated up front, and it is non-paged RAM, so the guest cannot be thrashing the page file. It's possible however that something else on the host was causing the problem - usually it's some runaway malware such as an resident antivirus scanning everything in sight. Next time it happens pop up the task list, see which process is doing lots of I/O (you may have to enable the IO read and write columns in Task Manager).

Re: Heavy swapping - Windows on Windows

Posted: 12. Oct 2012, 16:05
by MaryXYX
You asked for "Logs\Vbox.log". The ".log" files appear to be renamed to ".log.1" etc. so I attached the earliest. I attach the latest now.

I agree that the information we are looking for doesn't appear to be logged. I added the I/O read and write columns to Task Manager and confirmed that it is VirtualBox.exe that is doing the bulk of the I/O, and is still causing host page faults at about 40,000 per second. The anti-virus is doing a lot of I/O too, a little less than VirtualBox.

The RAM used by the VM does vary, but not by a lot. I have it at about 70 MB now (Mem Usage), with the virtual memory size around 60 MB.

Could this be an artifact of running a 64 bit host? Could VirtualBox be checking the host RAM, masking it to an expected "three and a bit MB" address space and deciding the system is desperately short of RAM?

Re: Heavy swapping - Windows on Windows

Posted: 12. Oct 2012, 16:37
by mpack
No, I don't believe your diagnosis is correct. There would be no need for VirtualBox to do complex memory arithmetic of the kind you suggest - it would just ask the host to allocate RAM, and the host would say yay or nay. In any case that would be a systemic fault in VirtualBox, meaning that everyone with a 64-bit host would see it - and VBox has plenty of users with 64-bit hosts running 32bit guests, especially XP guests. Whatever this problem is seems to be quite unusual, if not unique to you.

Re the apparant size of the memory allocation, I suspect that VBox allocates its main chunk of memory for the VM in an indirect way (e.g. I'd guess that its via COM). The 60MB or so which you see in the task list will just be more mundane sundry allocations by the various front ends, e.g. the manager GUI and the VM console window.

Re: Heavy swapping - Windows on Windows

Posted: 13. Oct 2012, 01:50
by MaryXYX
Whatever - if it is hiding the memory allocation by some means - and I don't know why it would, and somehow managing to leave the "Available" as shown by Task Manager at the sort of figure that makes sense, the original problem is still there. The "VirtualBox" process is causing host memory page faults at up to 40,000 per second and the VM is "Not Responding". Is there one of the command line tweaks to make it allocate the memory it needs?