My PC becomes almost unusable when VMware Player is writing its save-state to
.vmem file. VMware Player is delegating the task to
C:\Windows\system32\ntoskrnl.exe process. When looking in Task Manager, I see that CPU usage is just 5..10% and memory usage is ~40%, which is normal for me. When I open Resource Monitor, I see that ntoskrnl.exe is writing intensively to the VMware
.vmem file. As soon as disk writing stops, my PC immediately snaps back to normal.
I have scanned the disk for errors and performance issues with HDTune, I have tested the RAM with memtest. Everything is normal, no errors, drive performance is about 110MB/sec. I have antivirus (Avira Free) and I'm sure that ntoskrnl.exe is legitimate Windows process. Except for this issue, my PC has been running rock stable for three years.
Why writing to a hard drive which is not my OS drive affects the overall performance of a PC so much and what can I do to fix the issue? Also I don't understand, why does suspending to .vmem file take so long?
My virtual machine has Windows 8 as guest OS. It has 4GB of RAM. After I suspend the VM, my host PC is lagging for about 10-15 minutes which seems too much time to just write 4GB of memory state to the .vmem file. I tried also VirtualBox VM with the same guest OS and RAM 4GB and it suspends much faster and doesn't lag my PC after that. Also if I myself move files in Windows Explorer on the same drive, there is no such issue. Thus it seems VMware Player or ntoskrnl.exe is doing something too aggressive.
Here are the specs of my host PC:
CPU: Intel i3 2120
Motherboard: Gigabyte GA-H67A-USB3-B3
OS and system disk - Samsung SSD 840 EVO 120 GB, connected to internal SATA3 port
Data disk (which causes the slowdowns): Seagate ST31000528AS 1000 GB, connected to internal SATA3 port
OS: Windows 7 64 bit Professional with SP1, updated regularly
Thanks, I'll try that writeZeroes trick, hopefully that will work.
I run Defragmenter on that drive, and it shows 0% fragmentation.
Anyways, I'm worried about the fact that writing to a fast SATA disk can slow my PC that much - I imagined that writing to non-OS disk should be completely parallel and do not affect other operations...
No, no compression nor encryption. When I myself do something heavy with that disk, there is no PC lagging at all. For example, I just took the same .vmem file and now I'm creating a copy of it on the same drive, and while I'm doing it, my PC is fast and responsive. It seems, my PC starts lagging only when VMware Player (through that ntoskrnl process) is writing to the .vmem.
Thanks, I have been living with mainMem.writeZeroes for two weeks now and now my hard disk activity is much better. I don't notice any painful slowdowns after suspending my VM anymore. Hopefully, this fix will work forever.