If you use virtual machines at all, you should have the single most important virtual machine performance tip committed to heart by now: always run your virtual machines from a separate physical hard drive:
This is a companion discussion topic for the original blog entry at: http://www.codinghorror.com/blog/2006/10/the-single-most-important-virtual-machine-performance-tip.html
Are you sure your laptop won’t accept a secondary harddrive. Most brands I have see do accept them with an adapter. On my current Thinkpad T41 it was a 50 dollar option. I had the same thing on previous Compaqs and Dells too. I lose a CD/DVD, but I save the ISOs of the important ones on the drive. Plus I have had occasional power problems with external USB drives…but then I live in VMs in front of an audience for up to 8 hours at a time… But having access to a fast and big external drive looks interesting too…
seeing a straight line in the HDTach report is indicative of a problem…
I guess I wasn’t clear in the post. The drive was connected via USB 2.0 in the IcyDock.
Hey Jeff, just wondering if you have ever tried any of these laptop eSATA cards which allow attaching an external drive using eSATA:
I’m looking to purchase a new machine and am thinking i’ll go the laptop route rather than buying a big bulky desktop, especially considering most LCD monitors provide a pretty poor picture compared to a good quality CRT. I currently have a dell latitude C800 (yes, that’s 800 Mhz!!!) which I keep on using because it has a native resolution of 1600x1200 - something almost impossible to find on a laptop these days…
Actually those 10,000 rpm WD Raptor’s are pretty pricey for their performance “gain” when if you short stroke a much cheaper larger capacity 7,200 rpm drive (e.g. 320gb $100 vs. 150gb Raptor for $150) to the same size (i.e. 150gb to match one edition of the Raptor) you can virtually get the exact same performance for any data on that partition of the drive.
It’s not the real deal and has its drawbacks but it can be a nice alternative for those on a budget.
Jeff, what program are you using for your benchmarking? I’m curious about the speeds for my network drive in USB/network configurations, and how they compare to your trick Icy Dock.
laptop eSATA cards
Hmm, I never considered that. Are there any performance benchmarks for drives attached via eSATA cards? I suspect it will still do better than USB 2.0, but I wonder by how much… the interface will still be a bottleneck.
what program are you using for your benchmarking?
I used the free version of HDTach:
if you short stroke a much cheaper larger capacity 7,200 rpm drive
I’m really skeptical that this actually works. Do you have any performance benchmarks or links to substantiate your claim?
Jeff, you said:
laptop eSATA cards
Hmm, I never considered that. Are there any performance
benchmarks for drives attached via eSATA cards? I suspect it will
still do better than USB 2.0, but I wonder by how much… the
interface will still be a bottleneck.
I think Andy was suggesting a CardBus or ExpressCard ESATA interface. Why would that be any slower than a desktop machine with a PCI Express ESATA card?
laptop eSATA cards
Yes, I meant using a Cardbus or ExpressCard eSATA card to attach an external SATA drive to a laptop.
There is no bottleneck compared to USB as Cardbus runs at 132 MB/sec and ExpressCard at 500 MB/Sec compared to 480 Mb/sec (60 MB/sec) for USB 2.0. If comparing to SATA, then Cardbus would only offer 1/3 the speed of SATA II (3Gb/sec) but ExpressCard could handle this and more. Correct me if I am wrong - may well be getting my bits and bytes mixed up!
I was thinking of getting one of these cards for my laptop and hooking up to a pair of RAID Mirrored SATA drives using the thecus enclosure (http://www.thecus.com/products_over.php?cid=1pid=3). It would mean not having to do backups, which would be a major bonus… anyone tried anything like this?
laptop eSATA Cards
found a good benchmark article here:
from this, it sounds like laptop performance using an external SATA drive on an ExpressCard interface is pretty much identical to desktop using the built in SATA ports…
Jeff, seeing a straight line in the HDTach report is indicative of a problem… It means the HD being tested is limited by the IDE interface. Another clue is that you are hitting exactly 33MB/s all over…
I recently fixed a similar problem on my home system; incorrect BIOS settings caused the hard drive to get stuck in UDMA2 instead of a more tolerable UDMA6.
Once I fixed this, performance was much better, and I was getting a more normal “gradual” curve in HDTach.
In the graph, I assume (from the model numbers) that the red line is your internal SATA drive, and the blue line is your external USB drive.
No, it’s the other way around. That’s why the blue line stops at ~100gb, because that is the maximum capacity of the internal laptop drive.
nice tip, but I can’t use it. All I have is a laptop (HP nx8220, 2 GB RAM, 100 GB 7.200 hd). Ok, and a dockingstation and a Cherry keyboard and a mosue and 2 19" monitors (2x22" wide soon). All development is on VMs, from 500 mb up to 14 gb. If I put them on an external drive, I get
more points of failure (USB interface of the external drive, external power supply, another harddisk)
problems to have everything at hand at the customers site
problems to transport that external drive, it will not be as shock resistant as the one built into my notebook.
problems to find a power connector when I am out of office for the external drive
problems with different voltage in different countries (second adapter, I’d need a drive that can take the voltage)
problems with the backup (right now, I simply create Acronis images every night on an external drive.
If you ask me: more memory is the key. It works at least for me.
The drive was connected via USB 2.0 in the IcyDock.
I guess I wasn’t clear in my response In the graph, I assume (from the model numbers) that the red line is your internal SATA drive, and the blue line is your external USB drive.
My point was that the SATA drive is most likely connected to a misconfigured controller. Being stuck at 33MB/s for an entire test run is highly suspect.
What I’m trying to say is, the comparison is incorrect, since your internal SATA drive isn’t running at peak performance. That being said, I still agree with you that a separate hard drive is a must for speeding up many disk-intensive apps, but the real difference may be less than your test implies.
I can tell you empiracally that Linux is a better place to run a VMWare VM than Windows is. In fact, Windows in a Linux VM is generally faster than Windows running outside of a VM on this machine (ThinkPad T43, 2GB RAM, 100G disk). These results surprised me – I didn’t expect them – but they are real and have forced me to switch to Linux as my main platform for the first time ever.
There’s no empiric proof in any of that text. If you can point to actual benchmarks that show a difference, please do.
I’ve been doing dev 100% on VMs for over a year using VMs in the 20G range. I only use secondary drives for the development, and here are my comments on your qualms about doing so:
Buy highly-rated equipment. If your USB interfaces and disks are frequently failing, you need to look closely at your procurement process.
I use a Seagate 100GB external USB 2.0 drive. It’s smaller than the drives that can be assembled by buying your own bare drive + enclosure. In fact, it’s about the size of a PDA. It doesn’t require an external power supply – it runs off the USB power. It’s only 4200 RPM, but it’s far faster than running the VM on the same drive as the OS. It has been absolutely no problem having this at a variety of customer sites for the last year or so.
AFAIK the disks used in the external USB drives ARE laptop drives. Unless you’ve modded your laptop with extra shock prevention, that is. In any case, I’ve dropped my Seagate off desks many times without any problems. It’s robust.
Buy a drive like the Seagate that runs off USB 2.0 power.
See #4, this is a non-issue.
Why can’t you backup a USB drive? I backup my VM by copying it to network shares/other drives/ etc. It’s a file copy. What makes your internal drive special?
In addition, using a USB drive for your VM insulates you from OS/computer problems (just plug the drive in somewhere else). Plus, you can more easily share the VM with others when necessary (i.e. copying the VM over USB to their machine vs. copying it over a LAN).
In short, I think these are all bogus issues. If, like me, you’ve already maxed out your laptop’s RAM (where are the 6GB laptops?!?), a USB drive is a fantastic platform for running your VMs. Just get one, you won’t go back.
One more tip – run your VMs in Linux. I do my dev inside a Windows VM (see my prior comment), but I host the VM in Linux. Why? Simply put, Linux uses the hardware more efficiently. Whereas Windows constantly pages while running the VM, Linux doesn’t. In Windows, I can barely get anything done when VMWare is the only application running; in Linux, I can run Thunderbird and Firefox and music players etc. while I work in VMWare. I dual-boot, so I am comparing apples to apples on the same machine. I can tell you empiracally that Linux is a better place to run a VMWare VM than Windows is. In fact, Windows in a Linux VM is generally faster than Windows running outside of a VM on this machine (ThinkPad T43, 2GB RAM, 100G disk). These results surprised me – I didn’t expect them – but they are real and have forced me to switch to Linux as my main platform for the first time ever.
I’m not trying to wantonly dis Windows, but these results have been consistent for me. Try it yourself and you’ll be happy with the results.
A question to those “doing dev 100% on VMs” – can you please tell me, are you saying that the VM has the whole development IDE too so you’re running editors, compilers, whatever inside the VM?
Do you have separate VMs for web server, database server, etc or would you have a single VM with development environment, web server AND database server?
I’m just intrigued to know which route to follow. I currently only use VMs for testing web sites in lagacy browser, like IE6 (I guess it’s “legacy” now IE7 is out) but have always wondered how practical it would be to do everything within a VM.
In response to windows running faster within a vm running on linux as opposed to running on its own. Of course your not dissing windows, as you’re still running windows. What you’ve done just proves to say that windows is a great operating system and should run a lot faster if only it had the right drivers. The system running under vm is using the linux drivers to access the hardware and then the vm system is jumping onto those drivers.
Here’s a direct comparison between a modern 250 gigabyte 7,200 rpm SATA drive in the Icy Dock (connected via USB), and my laptop’s internal 100 gigabyte 5,400 rpm hard drive
Need to update graphic or text description below. Which graph is USB? And why does the red one stay constant at 30 Mb/s?
Thanks for any clarification