Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

The scenario:

A virtual machine (guest) running Windows 2008 R2 has a virtual hard drive with the swap file (by default) on that drive.

Recommendation:

Create another virtual hard drive that is physically located on another disk. Move the swap file over to the second virtual disk.

Expected outcome: performance increase in the virtual machine.

What I would like to know is, will this really improve performance considerably? Is it worth doing? Are there any case studies with proof? Has anyone done this and found it to work?

I know in theory it could improve performance, but as we all know theory and practice don't always add up.

share|improve this question
    
Think it's called swap, not swop –  Svish Jul 4 '11 at 20:19
add comment

2 Answers 2

up vote 2 down vote accepted

"Does moving a virtual machines swap file to another drive really improve performance?" If you have no swap file, then no. ;)

The answer to this depends on your host platform and VM config largely. It makes sense to me that providing a dedicated device for your swap should tend to result in some nice performance improvements. Though, if you've got a decent enough amount of memory on the VM, you'd probably never ever notice the difference and things would be getting swapped that you're not waiting on. Also, if you VM is configured to know it's a VM, then you can get performance improvements further, if you virtual machine host software is junk, then that'll factor in.

Anyway, my bet is for a server, it's not really going to matter in general. Especially if you have a workable amount of RAM provided to that VM and a good VM host platform.

share|improve this answer
1  
I just want to add a small note, if your computer is actually using a swap drive, best-case scenario you've gone from ~20 GB/s to ~100 MB/s - quite a slow down, so I would be more then happy to agree with "it's not really going to matter in general". If you're using a swap file, it doesn't matter where it is, your computer is gonna run a hell of a lot slower. :) –  Breakthrough Jul 4 '11 at 22:58
    
@Breakthrough - I don't believe that's strictly true, that'll run a great deal slower if you use swap. If your OSes memory management is doing its job (and has what it needs to do that well) then you should not notice any slow-down as memory contents that aren't being really used get swapped around. Some VM host software will actually swap what the VM sees as physical memory too. VMware generally offers some control over that practice. –  Doc Jul 4 '11 at 23:05
add comment

First, to illustrate a point, I am going to assume a scenario with two separate physical disks, not virtual disks: In that case, in theory yes, in practice, I would say not so much any more with modern disks being so fast.

On Microsoft tests, the answer for questions on how to set up Exchange and SQL Server was always: Data on one physical drive (or RAID), log files on another physical drive. This made a lot of sense when drives still were transferring at 66 Mbps-133 Mbps and spun at 5400 RPM...or even much slower than that at one time.

Now with drives that are so fast (6Gbps and 15,000 RPM), while you may be able to measure the improvements with special equipment, I doubt you will notice great practical improvement by moving the swap file to another drive. We are probably talking about milliseconds here.

Now lets talk about two virtual disks: Probably no benefit at all if the virtual disks both reside on the same physical disk sub-system. The main benefit in the first scenario was to have two physical disks (or set of disk in RAID) work simultaneously on different parts of the same task. In this case, you are asking for the same one physical underlying disk (or RAID volume), which is often the case with a hypervisor, to do all the tasks, regardless of how your broke up the virtual disks.

share|improve this answer
    
Some virtual host platforms (probably all of them really) can be configured to store virtual hard drives on whatever physical devices you like. Granted, I think your point about two VM drives will generally end up on the same partition. –  Doc Jul 4 '11 at 22:59
    
@The White Phoenix Yes, it is definitely possible to store them on two different physical sub-systems as in the first scenario, but I have just found that many, at least for smaller companies, have only one underlying RAID sub-system. –  KCotreau Jul 4 '11 at 23:11
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.