VMware Communities
petarb
Contributor
Contributor
Jump to solution

slow VM restore of saved state

Loading the 4GB saved state of a VM on a 13" MacBook Pro w/ Touchbar seems a bit slow: 20-70MB/s

Sequential reads/writes on the Flash Storage of this MBP go beyond 1000MB/s so why is the loading of a saved state so slow?

(Fusion 10.1.2, macOS 10.13.5)

Reply
0 Kudos
31 Replies
BillBuilt
Contributor
Contributor
Jump to solution

I am using a fusion drive.... ? It was the exact same fusion drive that worked perfectly up until Apple's update that allowed Fusion drives to work with APFS, and they converted the file system. It was about that time I started seeing this behavior. Prior to that everything worked flawlessly every time.

Reply
0 Kudos
BillBuilt
Contributor
Contributor
Jump to solution

Yes - all other disk operations work perfectly fine. I use iStat Menus to monitor all activity. When the VM is resuming very slowly, VM Ware is hardly using any resources and HDD activity is very very low. Nothing else however is acting in a diminished way, only VM Ware.

Reply
0 Kudos
ColoradoMarmot
Champion
Champion
Jump to solution

Ahh, ok.  So what's happening is that OSX is moving the data from the SSD to the spinning disk - that's why you're seeing a slowdown over time.  I suspect you have a split VMDK file which, over time, migrates in pieces to the metal disk, which is why the slowdown is gradual and ever changing.

APFS made a lot of changes to how the whole disk and file management system works.   First, and most relevant for this, it does more aggressively migrate files based on usage patterns.  Another example is that it also fundamentally changed how time machine works, and now makes extensive use of snapshots.  In the past we could exclude the fusion folder from time machine, but under the new system that just stops it from backing up - the snapshot still captures the entire drive.  Near as I can tell the only way to stop the snapshotting process is to disable time machine completely.    That has caused me to run out of available disk space on my main drive, because it snapshots my large VM's, but if I'm offline from my TM drive, it never clears those and over time, it consumes space.

So your problems would be happening with any application that uses large files - it's not a Fusion issue.  And apple hasn't provided a way to 'pin' files to the SSD portion of the drive.

For a couple of things to try, if you use the VM regularly, you could go back to a single virtual disk.  That would prevent pieces from being moved, but if it did move, you'd see a massive slow down until it migrates back.  Not sure if this would work.

The only sure-fire ways to get it to work are either to partition the Mac so that there is a dedicated drive on the SSD to store the VMs, then use the remainder for a fusion drive, remove the fusion drive and go back to two different drives, or, if you have USB-C, to get an external SSD drive (I use a samsung for this exact purpose) and put the VM there.  I find that performance via USB-C is nearly as fast as my internal SSD.

Wish I had better news, but you're kind of at the mercy of how the OS works.

BillBuilt
Contributor
Contributor
Jump to solution

Well that makes sense - and is the only logical explanation I have received yet - even VMWare support couldn't give me any explanation when I knew it HAD to be something with the APFS update..... except why would uninstalling and reinstalling VMware "reset" the time it takes to resume if the actual virtual machine files were never removed or moved?

I am going to convert the split drives into a single file drive and see if that helps too.

Thanks!

Reply
0 Kudos
ColoradoMarmot
Champion
Champion
Jump to solution

Did you happen to shut down (instead of suspend) the VM before doing the uninstall/reinstall cycle?  That'd likely recreate the virtual memory image on the SSD portion of the drive.  Otherwise, the cycle might force a re-read of the files, which would also move them back.

I'd be curious to know if moving to a single file helps (or hurts) the suspend - it may be the virtual memory image file that's the entire culprit in which case you're probably out of luck as long as the fusion drive is active.

Reply
0 Kudos
BillBuilt
Contributor
Contributor
Jump to solution

"Did you happen to shut down (instead of suspend) the VM before doing the uninstall/reinstall cycle?"

I can't remember, but I probably had shut it down simply because back then it was taking 30+ minutes to resume and that was the only way to use the VM - shutting down instead of pausing. Although if the reinstall had no effect, the first time I tried pausing/resuming after the reinstall should have taken the 30+ minutes that it was taking prior. However it did not, it worked great and, just as before the reinstall, slowly started taking longer and longer.

I will post my findings on the conversion to a single drive file here - I will likely need to wait until morning to see how well it resumes. And if it's good, then see how well it performs over time.

Reply
0 Kudos
BillBuilt
Contributor
Contributor
Jump to solution

So, after nearly 2 weeks of having the VM HDD converted from multiple files to a single file I can report that resumes have been fairly quick and consistently so. It seems, at least for now, that going to a single file HDD definitely helped.

Reply
0 Kudos
ColoradoMarmot
Champion
Champion
Jump to solution

Great news!  We'll keep fingers crossed 🙂

Reply
0 Kudos
BillBuilt
Contributor
Contributor
Jump to solution

After almost another 2 weeks and no change (good or bad) in resume performance! So, I'd say to anyone else having this issue, the first thing to try is converting your virtual HDD from multiple files to a single file if that applies to your case. It was definitely the only thing that fixed this issue for me.

Special thanks to dlhotka​ for taking the time to help me figure this out!

Reply
0 Kudos
ColoradoMarmot
Champion
Champion
Jump to solution

You're very welcome, and thanks for writing with results!  Fingers crossed it stays fixed 🙂

Reply
0 Kudos
petarb
Contributor
Contributor
Jump to solution

This problem is gone since upgrading to MacOS 10.15.1 (Catalina) and VMware Fusion 11.5.0.

Fresh boot, FileVault on, 4GB VM loads in about 2 Seconds.

Reply
0 Kudos
trallstar1539
Contributor
Contributor
Jump to solution

This fixed my issue. Appreciate the info.

Reply
0 Kudos