VMware Communities
AndrewClarke
Contributor
Contributor

VMware Fusion 4 drops Real Memory, then slows down

I'm running VMware Fusion 4.0.2 on an 8 core 2008 Mac Pro with 14GB of RAM, running OS X 10.7.2 (Lion).  I'm generally running 1-2 VMs.  The one that's the biggest culprit here is a Windows 2008 x64 VM with 4 cores and 5120MB of RAM assigned to it.

When I start up this VM, it runs fine.  However, if I end up filling up my RAM with other tasks, it will drop down the Real Memory usage (as seen in Activity Monitor) from about 5.2GB to a lower number.  If the amount of memory used for the VM drops like this, the VM quickly slows down to an unusable state.

What's perplexing about this is that it seems to happen by itself, even when I'm not using the computer and there are several GB of RAM available to the system.  I can't figure out why VMware is relinquishing my VM's memory back to OS X, and then why it's becoming unusably slow when there are, say, 4GB of free RAM available for it to take back.

Has anyone else experienced this?  I really need to resolve this problem.

Thanks,

- Andrew.

Reply
0 Kudos
6 Replies
AndrewClarke
Contributor
Contributor

I should mention two other points.

1. The VM doesn't immediately max out its memory.  I know this is consistent with how they should work, but, for example, this particular VM was just started up and is only using 2.65GB of memory.  It's fast and responsive now, and will scale up its usage as needed.  I'm just not sure why, once it's scaled up and back down, it won't scale up again like it does the first time.

2. Even when this VM is slow, any other VMs I'm running at the same time work just fine without any noticeable slowdown.

Reply
0 Kudos
tracywang
Expert
Expert

I think maybe try to reduce the resource taked by VM to see if the VM is running properly. Such as assign 2008 with 4 cores and 3GB of RAM or 4GB. More resouce on host have better integral performance.

Reply
0 Kudos
AndrewClarke
Contributor
Contributor

I'm not sure what you mean by "More resouce on host have better integral performance".  I have 14GB of RAM so I can't really see how having a VM with 5GB of RAM assigned to it is too much.

I could just go out and bump the RAM up to 20GB, but I'm loath to throw money after the problem until I understand what the issue is.  I've assigned 5GB of RAM to the VM because it needs that much, so I can't easily just reduce the RAM used by the VM without it affecting performance in other ways.

- Andrew.

Reply
0 Kudos
HPReg
VMware Employee
VMware Employee

As a policy, to avoid endangering the host OS, VMware Fusion will refuse to wire memory when 70% or more of all available host RAM is already wired. You said you have 14 GB of RAM. So Fusion will not wire memory if 9.8 GB or more is already wired.

Your VM has 5120 MB = 5 GB of virtual RAM. Initially, Fusion will back that much virtual RAM with wired memory, i.e. Fusion will wire 5 GB out of 9.8 GB.

Then if Mac OS or other applications wire memory, or if you start more VM, it will force Fusion to hit the 9.8 GB limit, at which point Fusion will start degrading the performance of VMs (i.e. Fusion starts swapping the virtual RAM of VMs to disk). Normally, this affects all VMs, but it is possible that in practice it appears to affect your 5 GB VM more.

So first, let's verify this theory: watch the amount of wired memory in Activity Monitor. Does the slowdown of the 5 GB VM start happening when the amount of wired memory reaches 9.8 GB?

AndrewClarke
Contributor
Contributor

I think you've nailed it.  Your explanation is consistent with what I'm seeing.  I have a couple comments about this:

1. The 70% limit seems like it should also be based on the amount of RAM available, not just a percentage.  For example, if I have 4GB of RAM then you'll require 1.2GB free.  However, with 14GB you require 4.2GB free.  Therefore I have to purchase an extra 3GB of RAM to sit there doing nothing, just so VMware doesn't degrade my VMs.  This isn't a very efficient use of resources for those of us with more memory.  Mac Pro RAM isn't cheap...

2. This point started off as a question but now I think it's just a comment.  I've been frustrated that once a VM releases memory, it doesn't seem to retake it when it needs it, even though the RAM is free on the host system.  I wonder if this is because there isn't the magical 4.2GB free, so VMware won't reassign memory to the VM.  Is this the case?  It seems to me that if there's sufficient memory available on the host, it should reassign it back to the VM when the VM needs it.  In my case, I have to end up shutting down, closing, and restarting my VM to get any sort of performance out of it.  Shutting down the VM alone can take 10-15 minutes when it's starved for RAM.

Is there a way I can tweak that 70% parameter somewhere?

Thanks again,

- Andrew.

Reply
0 Kudos
HPReg
VMware Employee
VMware Employee

The 70% limit has been removed from Fusion 5.

Reply
0 Kudos