VMware Communities
mkummer
Contributor
Contributor

100% CPU usage after Resume

I use v. 3.0 with Win7 on a Snow Leopard MacBook pro 17 with 4 GB RAM and the default settings in the virtual machine.

Things run well so far - BUT: every time I resume the VM, I get a period of increasing time of 100% CPU usage in the VM which makes the VM quite unresponsive. The perod expands the more often the resume command is executed. So after 5 or 6 resumes the VM needs up to 5 min. or more to enter the usuable state. If I restart the VM - which takes its time then too, all get back to normal.

Can anybody comfirm this behaviour or even better give me tipps to get rid of that??

regards, Michael

regards, Michael
0 Kudos
17 Replies
mkummer
Contributor
Contributor

Obviously no one else has this problem? I figured out in taskmanager that the task dvm.exe takes most of the CPU usage. Right now the resume action takes 15 min. with 100% CPU - only under the VM, the CPU of the MacBook Pro has low CPU usage...

regards, Michael

regards, Michael
0 Kudos
todivefor
Enthusiast
Enthusiast

Is your problem the same as:

http://communities.vmware.com/thread/239151?tstart=15


Macbook Air M1, Ventura 13.5, Fusion Player 2023 TP
0 Kudos
mygogo
Contributor
Contributor

I have exactly the same issue. I tried to install a fresh Snow Leopard and Fusion 3.0, and then created a fresh new VM WinXP, same result. I even could not launch the task manager program on the guest OS because it did not response to my moue clicks.

0 Kudos
mkummer
Contributor
Contributor

I wonder if these problems are related to back ground tasks running under OS X? I usually have Safari, iChat, Mail, iCal and itunes running, 4 GB of RAM available. Since some Programs use a lot of RAM , perhaps not all of it is set free after quit for Fusion? I notice, that the described effect is worse, if I had a encoding with Handbrake before. The best behavior of Fusion is after a newly started Mac... (??)

regards, Michael

regards, Michael
0 Kudos
mygogo
Contributor
Contributor

I don't think so. I have this problem with only Safari and Firefox opening in the background. I just noticed RAM settings affects this problem. Less memory set to a VM, more quickly it recovers from no response.

I have a Macbook Pro (MBP 4,1), 2.4G C2D, 4GB RAM. Thanks.

0 Kudos
drewberry
Contributor
Contributor

I have exactly the same issue. I am running Snow Leopard, I have plenty of processing power and RAM and spotlight indexing is disabled. I can also confirm that this happens on various Windows guests. Even when I close the program consuming the majority of the CPU in the windows guest, another process then starts consuming more CPU and it stays at 100%. This even includes the task manager process taskmanager.exe. I believe that this could be some sort of bug with Vmware fusion.

0 Kudos
feamster
Contributor
Contributor

I have the same problem with 3.01. Restarting the VM doesn't help. Pausing and re-resuming doesn't help. Only resuming (or restarting) after a OSX reboot works. It's clearly a VMWare problem. I'm only sticking with fusion because parallels can't properly import the 3.01 fusion machine (mouse and keyboard are unresponsive after import in parallels).

I'm on the latest Snow Leopard and 6gb of mem. First gen unibody MBPro.

0 Kudos
rmschne
Contributor
Contributor

I'm seeing same with VMWare 3.1.1 and latest version Mac OS on a MacBook with 4 gb memory and 1284 memory set in VMWare Fusion for Win 7 (latest version). Takes 10-15 minutes to "resume" Windows 7 and while that happens Mac crawls. Irresponsive. As suggested elsewhere have revised Spotlights setting to avoid indexing VMWare folders.

Any other thoughts? This can't be right.

0 Kudos
ColoradoMarmot
Champion
Champion

how much free memory is there on the host when you resume? Make sure you also only have 1 CPU configured (not 2)

0 Kudos
rmschne
Contributor
Contributor

Thanks. I indeed have 1 cpu configured. I watched Activity Monitor. It's down to applications fighting for memory. If I have about 700mb or more free memory, it loads faster (of course I understand why!). I I close down many of the Mac memory hog programs (Safari, Mail, DEVONThink) to give the machine at least 1gb, then it goes sort of ok in the one test I did. I also tried it before shutting down the memory hog programs and it took forever. Makes sense. I guess I sort of expected the Mac to shed memory to the disk more transparently than it apparently does.

For this one test, I noticed Safari had about 500 mb memory taken (from recollection). When I restarted it to write this reponse, I notice it's down to using only about 62 mb. So it's sort of the bad actor here also, I guess. Who knows. As I write this, VMware-vmx has about 1.5 gb, and there is 400 mb "free" (out of 4 gb real memory available).

So, when I know I want to run Win7, I'll just close down programs to give it a lot of room rather than rely on the OS to do all this.

0 Kudos
stevemaser
Contributor
Contributor

So, anecdotally, I see the same thing -- I often see 100% CPU usage just starting/resuming a Win7 VM (using 3.1.1) on 10.6.4

My stats: 3G iMac with 4G RAM. Win7VM set as 1 cpu and 1G RAM.

When I reboot the Mac, the following auto start when I log in: iChat, Safari, iCal, Eudora 6.2.4, ShareTool 2.x. Sophos 7.1.10 is also active. Firing up Activity Manager at this point shows that I have 2.02G "free" memory.

I started Fusion and as it's loading the Win 7 VM (not "resuming" -- starting from a "shut down" state), the CPU zooms up to 100%

As I'm typing this message, I see the %CPU oscillate between 15% and over 100%.

The "free" memory is now 967MB.

Eventually, the vmware-vmx process seems to settle down to between 20-50%.

I suspend the VM and quit Fusion. This goes very quickly. Note that I've not actually done anything in Windows beyond log in to Windows after I start it up..

I wait a few moments. The amount of free memory reported by Activity Monitor goes up slightly to 1.18G

Relaunch Fusion. Free memory is 1.15G

Resuming goes quick. CPU is back up around 100% and oscillating near 100%

Free memory is 775MB. Wait a few minutes. Quit/suspend Fusion. Wait until vmware-vmx no longer shows as a process.

And the above behavior can be repeated -- until I actually start doing other stuff with my computer.

Now, if I launch other stuff I use: Remote Desktop, Word, Excel, jDownloader, TextEdit, Terminal...

Free memory drops to 627M.

Restart Fusion and resume again.

vmware-vmx CPU back up to 100%. Free memory down to around 180M (and a new swapfile was created). %CPU eventually settles down to around 10-20%

What basically then happens over time is that when more and more swapfiles get created (for whatever reason), then the act of resuming a VM -- will bog the system down -- for quite some time -- until things "settle"

The "solution" is to reboot your computer -- and not run a lot of other apps -- apparently. Or have more than 4G of RAM on your Mac so you aren't generating swap files. Not much of a solution, but...

0 Kudos
ColoradoMarmot
Champion
Champion

These kind of resource contentions are killer. Changing to a fast (7200 rpm) hard drive can make a big difference, as can defragmenting the host. But in the end, yep, if you're out of memory, VM's thrash systems pretty good.

Do make sure you're not using AVG antivirus. I'd also disable system recovery (and system restore points) in the VM, as well as any sort of a/v scan (just use real-time protection).

0 Kudos
rmschne
Contributor
Contributor

I need to report that I took your suggestion to disable system recovery. Big Difference.

From a reboot of Windows 7, it was very fast (slightly slower than booting a regular PC and much faster than before) and did not "take over" the Mac. Could hardly tell while I browsed web site with Safari running. Then I suspended Win 7, and then restored it. While waiting a minute or two for it to restart, started writing this in Safari. Again, no disruption. Big difference.

Thanks!

I'm happy to disable system recovery because I assume that I can use my Time Machine backup/restore to get the VM folder back if needed. Is this assumption correct? (I did this once before in an emergency for an XP VM, and it seemed to work).

(I'm using Microsoft Security Essentials for virus protection ... but frankly, not using the Internet or mail on this VM).

0 Kudos
ColoradoMarmot
Champion
Champion

Glad that worked!

Time Machine is actually a terrible way to back up virtual machines. Every time the machine runs, it touches virtual disk files, which triggers a backup of them (so if your VM is 20 GB, you'll be backing up 20GB repeatedly). Plus, since time machine only backs up changed files, you can end up with a VM that's not consistent (especially if it's running while time machine activates). You're much better off simply copying the .vmwarevm file to an external hard drive once a week or so, and disabling time machine from backing up the VM's.

FWIW, In all my years of working on windows, I've never once used system recovery. Usually the darn thing is so corrupt that I just rebuild from bare metal.

0 Kudos
rmschne
Contributor
Contributor

Sorry, but I'm going to have to question you on that assertion. While in Finder the VM "looks" line one file, it's actually a "package" composed of hundreds/thousands of files. I'm pretty sure that Time Machine only backs up those files that change, not the entire psuedo-file "package". Then when you restore, Time Machine goes back and gets all the files, including old files, that make up the "package" you've asked it to backup.

I'm quite sure I won't remember to do a manual backup. My understanding is that I don't have to since Time Machine does all this work for me and backs up only the bits at time which change.

I'm using the computer as designed and intended; which is to save me time.

Maybe I'm wrong. If I had time right now I'd run a test to confirm my understanding; perhaps at the weeks I will.

0 Kudos
admin
Immortal
Immortal

While in Finder the VM "looks" line one file, it's actually a "package" composed of hundreds/thousands of files.

Yes (hopefully it's closer to hundreds than thousands, though).

I'm pretty sure that Time Machine only backs up those files that change, not the entire psuedo-file "package".

True.

However, what you're not accounting for is that just starting and stopping a virtual machine will cause most of the vmdks (which take up most of the space) to change, so being a package doesn't really save you anything.

Worse, Time Machine is pretty bad at handling files actively in use - if you only take Time Machine backups when the virtual machine is powered off or suspended, you'll probably be fine, but if Fusion is running at the time of the backup, it may be no good. There are numerous horror stories on these forums from people who thought they would be fine with a Time Machine backup of their virtual machines, only to find out when push came to shove that the backup was incomplete or corrupted.

If you don't want to worry about manually backing up, there are some things you can do. You could keep all your data on the Mac (via Mirrored Folders, or the more generic HGFS shared folders) - Time Machine should back those up fine. You could make sure that Time Machine only runs when virtual machines are not running. You could run backup software in the guest.

0 Kudos
rmschne
Contributor
Contributor

Thanks for the insights. I let Time Machine run all the time, taking hourly backups (default). I also let the Macbook run all days and (mostly) overnight. And I don't keep the VM's running all the time. Just when needed since the Win 7 VM takes up so much memory that when I'm not using it I just suspend it to get it out of the way (hence the original query here about the excessive time to restart from suspension). Further, as you suggest, I keep all the data on the Mac file system so that it's available to Mac programs and shared with my desktop Win 7 machine and backed up.

So, this means, I think, that when it comes time to restore a VM from Time Machine backup I'll just pick a restore point that was done recently at a time (night time?) when I know the VM wasn't running. And if it turns out that VM restore does not work, I'll just pick the previous one. Odds are one of the recent ones will work, I think. And if I can't get a backup to work, then start again. Coming back from a Time Machine backup beats reinstalling all the software (take a lot of time) on a newly created VM. I had to do this once on XP about a year ago (don't know why), and it worked fine. So I view the risk of Time Machine giving me a bad backup a low probability event, and even if it happens, it doesn't really matter since while it will cost me a bit more time to restore the VM, I haven't lost any data and I can always reinstall the VM and its applications from scratch. Hence, since I probably can save a lot by using Time Machine, I do.

My Win 7 VM is 53 gb. Because of it's size, I have no convenient place to put this file for backup other than to let TimeMachine handle.

0 Kudos