Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I use VMware on a daily basis, it is slow even though I have a brand new machine with 4 gigs of RAM.

How can I speed up my VMWare software? I know one bottle neck is my hard drive, it is a laptop so the hard drive isn't have the fastest RPM's.

  • I am running Ubuntu Linux in VMware.
  • I am using Eclipse, python, MySql and a few other light weight programs.
  • The machine is a Lenovo T400 with a Centrino 2 processor.
  • I am running VMWare Workstation 6.5.
share|improve this question
    
How is it slow, what are you doing in your VMs? –  Zoredache May 29 '09 at 8:00
    
Many cores, SSD disk and 4G memory. –  James May 29 '09 at 8:23
1  
which vmware product and version? –  Chopper3 May 29 '09 at 9:53
add comment

4 Answers

up vote 2 down vote accepted

Always, always, always pre-allocate your VMDKs! Also, if you can, partition your drive so that the virtual machines will have their own partition as close to the beginning (physically towards the outside of the platter) of the drive as possible, next to parts of your OS that will be written to (/var, swap, /home). If the host OS and VMDKs are all on one half of the platter, you've cut your seek time in half for most operations (static files are read once and then held in memory - take advantage of this!).

Changing out the CFQ for the anticipatory or deadline I/O schedulers may increase performance, depending your usage. Also, check out these kernel settings to optimize how your RAM is used:

  • /proc/sys/vm/swappiness
  • /proc/sys/vm/vfs_cache_pressure
  • /proc/sys/vm/dirty_background_ratio
  • /proc/sys/vm/dirty_ratio
  • /proc/sys/vm/overcommit_ratio

And these for your I/O:

  • /sys/block//queue/scheduler
  • /sys/block//queue/
share|improve this answer
    
Odd, my college professors always say: "never ever ever pre-allocate your VMDKs" Because of the harddisk-space –  KdgDev May 29 '09 at 9:13
1  
The only scenario in which you wouldn't pre-allocate would be if you were oversubscribing your disk. –  Alex Jurkiewicz May 29 '09 at 9:56
    
I don't preallocate my disks either, mostly because the transfer time across my WAN is painfully slow. At least they compress nicely when not in use. –  Matt Simmons Jul 2 '09 at 15:52
1  
I thought that the optimal io scheduler would be "noop", since it falls specifically on the "Smart HBA" –  Steve Schnepp Jul 10 '09 at 15:20
    
@Steve S. You still want to batch your reads and writes. IIRC, noop will issue the IO right away, even if it's for a read at the other end of the disk platter. I'll have to check iosched.txt again, but I think the only time you want noop is when you've got remote storage that has a smart IO scheduler batching your requests for you (IE, time spent serializing requests is wasted since it's done at the other end, too). –  Gazzonyx Jul 11 '09 at 2:30
show 1 more comment

Your VM's will be competing heavily on IO. Be sure as to not cause IO starvation, especially for reads. When a process (and that includes VM's) cannot read data, the process will keep waiting until it does. Being able to read data is extremely important; more so than writing data, which will go into buffers in the first place anyway. You'll see this in your performance monitoring tool (like the various *tops) as high iowait values.

To help this, I agree with the previous poster to choose another scheduler. You'd have to try which one works our best for your workload, but deadline sound like a good choice for you.

I am curious as for how many VM's you run concurrently.

A couple of months back, I was building a FreeIPA setup for someone, with both the server and the client on my machine in VMware Workstation VM's. Slow as hell. Recently, I started using KVM and my performance trouble is solved. KVM makes the kernel a hypervisor itself, which means that the virtualization stuff takes place in ring 0 instead of in, say, ring 3. This means massive performance increases. I suggest you try it out.

share|improve this answer
add comment

One good way to speed up VMs is to place them on a separate physical disk. Since you're running on a laptop, you may have to look at getting an eSATA ExpressCard Controller. (I wouldn't bother with USB as the bandwidth just isn't there).

I was having similar issues on my development laptop and after moving to an eSATA setup, I'm very pleased.

When running everything off my single boot disk, I'd see very noticable performance degradation when running particular VMs. VMs running WinXP seemed to work fine, but the minute I powered on a Server2008 VM, the performance would noticably drop. After switching to an ExpressCard/eSATA setup, I was able to run all the VMs without issue.

The other advantage of using eSATA is that you can get a full-size external enclosure which lowers the cost of the drive significantly and increases your options. For example, you could put a 10k rpm drive in there for some really decent IO, or simply have terrabytes of space which you just couldn't get with a standard laptop configuration.

One thing to watch out for though is how your ExpressCard bus is actually implemented in the laptop. For some reason my setup peaks at 100Mb/s when I know the drive natively is capable of at least 200Mb/s..

share|improve this answer
add comment

Some computers have a virutalization option in the BIOS. Turning that on will help. I know my computer doesn't, but a coworker's does and it made a significant difference.

share|improve this answer
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.