VMware Communities
ferben
Contributor
Contributor

Harddisk buffering does not release memory in time

Hello,

I found when Harddisk buffering feature is set to Automatically or Enabled VMWare Fusion is not able to release unecessary caches from memory in time.

It cause that OS X spent all free memory for Fusion caches and all memory was occupied by Inactive memory.

After that OS X going to be much slower until you enter „purge“ command in Terminal.app.

Only one workaround is Disable Harddisk buffering feature but hosts system will be pretty slow.

I've tested VMWare Fusion 5.x (OS X 10.6/10.7/10.8) and 6.x (OS X 10.8) in both versions this bug occured.

-Frantisek Erben

4 Replies
Optimyzed
Contributor
Contributor

I have also noticed huge memory leakage (3+ GB of Inactive memory indicated by Mac Activity Monitor) after just a few minutes of using a Win7 Pro guest VM in Fusion 5.0.3.  After a few hours, the host starts swapping to disk (page ins/outs) slowing everything down.  I have 8 GB RAM in the host and have allocated 1 CPU core and 2GB RAM to the VM.  Immediately after starting the VM, I still have 3 GB free RAM, which is gradually consumed while working in the VM.  It wouldn't be a problem if the host OS could free and reuse hte inactive memory, but that doesn't seem to happen.  Once my free meory has been consume and sits "inactive," swapping starts (page outs/ins).

Thanks for the hint on the purge command.  Very helpful.

Next time I restart the Win7 VM, I will turn off Hard Disk buffering and see if it make any difference for me in terms of Inactive memory and  virtual memory swapping.  I 'll post the results here later today.

PS - I'm running under 5.0.3 because 6.0.1 is giving me problems with running Unity and cut/paste between host & guest

0 Kudos
ferben
Contributor
Contributor

I have similar configuration 12 GB total RAM in iMac, 2 GB and 2 CPU for virtual Windows7.

I think that does not matter how much RAM you totally have, buggy cache management in Fuision or OS X "convert" all free memory to inactive (cache) but if you have a really lot of RAM (32 GB+) you meet this point later.

There must be a bug in detection time depend or amount of occupied RAM when Fusion purge their hard disk caches.

That bahavior but might be in OS X memory management bug not Fusion bug – VMWare QA department should test it!

-Frantisek Erben

0 Kudos
Optimyzed
Contributor
Contributor

I'm SSSOOOOOOOO glad this topic was started!

With "Hard disk buffering" enabled (Settings, Advanced), I was running out of memory in my Mac 10.8.5 OS within about 2 hours when using a Win7 Pro guest.  Over the course of that 2 hours, my "Inactive Memory" as shown in Activity Monitor would slowly grow until there was no Free memory, and Page Outs started happening in the host OS.  Not good.  I was seeing the "blue pinwheel" quite frequently.  The only fix was to reboot the entire machine.

When it ran out of RAM and started swapping earlier this morning, I shutdown the VM and Fusion, then issued the "purge" command from the command prompt (which freed up nearly 4 GB of "Inactive" memory.)  I noted that closing/quitting Fusion did not "release" any memory from the Inactive pool to the free pool, but purge cleaned that up.  I then restarted Fusion with 6 GB free,  turned off "Hard disk buffering" in the Win7 guest VM and booted it.  After nearly 2 hours, I still have nearly 2 GB of Free memory in the host OS, and the Inactive memory has stayed right around 600 MB, instead of running slowly up to more than 3 GB.

Based on this, it certainly appears that the "Hard disk buffering" Advanced feature is causing the Host OS to run out of memory and start swapping when using it with my Windows 7 guest.

Again, I am very grateful that someone figured out that the Hard disk buffering setting was causing this problem, because it was really affecting my productivity at work!  So far, things appear to be working much better with it turned off under Windows 7.

Thank you, Fusion Community!

pwjohnston
Contributor
Contributor

I've been fussing with this all night to no avail.  Reinstalled Mac over the weekend thinking there was something odd about the OSX, thought it might have been this.  I had been running 5.0.2, but I noticed there was a new version after reinstall of Fusion and I installed 5.0.3.  It didn't seem to start doing this till I did updates on Windows 7. 

I uninstalled 5.0.3 and reinstalled 5.0.2, but the problem persists.  I disabled the Hard Disk Buffers and the problem persists.  I'll be calling VMware and Apple support tomorrow to see if I can get an answer.  Now I've stopped and will set a cron job to run purge every 5 min. . .

0 Kudos