Why do virtual machine files on a ramdisk not run faster than on a physical disk?

7

I installed a total of 36 GB of memory (4x8 GB + 2x2 GB) onn the host (Windows 7) and I used ImDisk to create a 32 GB ramdisk and formatted it with an NTFS file system.

Then I copied the virtual machine (in VMware Workstation format) folder, including .vmx, .vmdk, etc. to the newly created ram disk.

Then I tried to power it on in VMware Workstation.

What made me surprised is that the performance is not better than before. It costs almost the same time to power on the Windows 7 VM.

I checked the Resource Monitor in the Windows 7 host, and the statistics of CPU, disk and network are rather normal. The memory has reported 3000+ hard fault/sec when the guest OS boots, then drops to 0 after the guest powered on.

Any idea about this issue? I had thought the performance of ramdisk would be better than a physical disk in this case. Am I wrong?

Landy

Posted 2012-03-31T15:10:57.260

Reputation: 773

Micro optimization. Sigh. – surfasb – 2012-04-03T05:03:27.000

Answers

2

You didn't mention how your RAM is allocated. if the VM is too small it will cause paging activity this could show up as page faults in the VM. Thinking this might keep your cpu load as you swap in and out from your swap space (if its in ram disk you probably won't see much host IO mainly VM io)

LhasaDad

Posted 2012-03-31T15:10:57.260

Reputation: 153

What do you mean by "If the VM is too small?" – lzam – 2014-10-01T03:30:25.020

1Your virtual machine (guest) will have a RAM size defined for it in its settings. this is the VM equivalent of the memory you installed for the host systems os. example: you said you have 32 gb set up for a ram disk but only 4 gb for your base OS to use. from that 4gb your also providing the RAM to you guest system is running in. that is not a lot of memory to run a host and guest on these days. – LhasaDad – 2014-10-01T13:37:36.047

0

My guess would be that VMWare can't handle that speed because the program is on your hard disk. You should see a performance increase (more responsive in my case) when you put the paging file on the ramdisk and make sure to make the registry edit to clear the page file at shutdown (to prevent page file error- looking for something that isn't there anymore). The page file is loaded before the ramdisk is initialized.

Ben

Posted 2012-03-31T15:10:57.260

Reputation: 1

1That's not strictly true, @Gizmo. The paging file is used for long-idle pages in all processes. It is true that inactive procs will have more long-idle pages than active ones, but on the other hand only active procs will be experiencing page faults, and page faults are when working set replacement (i.e. pushing old stale pages out to the page file) happens... if it happens. Source: Windows Internals by Solomon, Russinovich, and Ionescu, Memory Management chapter. – Jamie Hanrahan – 2014-08-18T23:06:04.837

paging file is only used for INACTIVE applications. – Gizmo – 2013-08-17T23:57:08.680

Details – Gizmo – 2013-08-18T00:03:00.023

0

Did you check if the RAMdisk is created in virtual memory or physical memory? The virtual memory mode will use the swap file, so doing this makes no sense.

You can check this in the configuration tab of imDisk, see 'image file'. If it indicates 'virtual memory' it is created in the swap file. When you see 'Physical memory', it is created directly in memory.

Besides, the VM-files are huge, so you need to increase the block-size/cluster-size matching the VM-Drive block/cluster size.

Codebeat

Posted 2012-03-31T15:10:57.260

Reputation: 312

0

Are you sure VMWare doesn't use the virtual disk on the physical hard drive? VMWare tends sometimes to use full paths. Rename the directory (temporarly) your VM resides in on the disk, then VMWare will present you the option to select if you moved or copied the machine, choose copied ofcourse.

After that, if it doesn't work, It could depend on VMWare's emulation properties/capabilities. You can try VirtualBox for a chage. I hope you are using SCSI instead of IDE mode in VMWare?

Gizmo

Posted 2012-03-31T15:10:57.260

Reputation: 1 549