Vivek Agarwal’s Portal/Java Blog

An IBM Gold Consultant’s weblog about IBM, Lotus, WebSphere, J2EE, IT Processes, and other IT technologies

Improving VMWare Server performance on Windows XP

Posted by Vivek Agarwal on July 8, 2008


Over the last year, we have made a big push to move our development/test environments to a virtualized environment using VMWare Server. While we have not really encountered serious performance issues with our test servers, my team was reporting very poor performance with running the development virtual machines on their laptops. Now, keep in mind that these are pretty powerful laptops with 3 or 4GB of RAM, a T9300 dual-core processor, and a 7200RPM SATA hard drive. So there was more than enough horsepower to run WebSphere Portal in a virtual machine. However, the facts did not bear it out and in fact my team was reporting that running the virtual machine was in fact slowing their laptops down to a crawl with the constant hard disk access – a build that ought to take 5-10 seconds was taking several minutes. Obviously an unacceptable situation and people had reverted to just using a local WebSphere Portal install on their native OS – the issue with the local installs was that these local installs were not configured with LDAP or all the customizations/configurations that our test VMs have. When I found out about the issue and workaround and the fact that my pet initiative had fallen by the wayside, I felt challenged to resolve this issue. I tried it out on my own laptop and was able to reproduce this issue, and 2-3 hours later, I had the issue resolved.

To reiterate, the root cause of our performance woes was the excessive disk I/O being done by VMWare. Even though, we had plenty of RAM on our laptops and had more than enough RAM allocated to the Virtual Machine, what I noticed was that while VMWare would start by using significant amount of host RAM, over time it would release that RAM back to the host O/S. Once I realized what was going on, I did some Google searches and looked up the VMWare settings help, and had a resolution to my issue.

Here are the changes that I made to my laptop and to the VMWare settings to improve performance –

  1. Disable Memory Page Trimming

    VMware Server uses a memory trimming technique to return unused virtual machine memory to the host machine for other uses. Although trimming usually has little impact on performance and might be needed in low memory situations, the I/O caused by memory trimming can sometimes interfere with disk-oriented workload performance in a guest. To disable memory page trimming, check the Disable memory page trimming check box (Select: VM > Settings > Options > Advanced), and click OK.

    Given that I have enough RAM on my laptop, my first step to improve performance was to disable memory trimming for guest VMs.

  2. Disable real-time anti-virus protection

    Given the size of the VMWare virtual disk files and given that they are continuously being written to, I figured that my real-time anti-virus protection (Symantec AV) was probably not helping any with my disk I/O performance. So, I went ahead and excluded the VMEM (Virtual Memory – .vmem extension) and VMDK (VMWare Virtual Disk – .vmdk extension) files from the real-time scan.

  3. Disable memory sharing

    When the first two steps did not yield the results I wanted, I did some more searching and stumbled upon this default VMWare feature of page sharing that enables VMWare to save on memory usage if multiple virtual machines are running the same operating system or the same applications. I am not sure how this works in my scenario where I only have 1 virtual machine running at a time, but it certainly appeared to me that VMWare was scaling back its memory usage resulting in unnecessary disk I/O and this seemed like a possible culprit. I disabled memory sharing by adding a setting sched.mem.pshare.enable in my virtual machine configuration (.vmx) file like this:

    sched.mem.pshare.enable = “FALSE”

Well, these 3 settings did the trick for me! No more VMWare performance woes – the guest VM performs adequately without affecting performance of other applications on my host OS! Keep in mind, that you should also look into defragmenting your host disks and also shrinking your virtual disks for the best performance. I had already done these steps before I spent the time to track down the performance issues. Now, my team can go back to adopting the VMWare development virtual machines! 🙂

Advertisements

6 Responses to “Improving VMWare Server performance on Windows XP”

  1. Some good information in here, we have made these changes it it certainly seems to have improved things for us.

    Thanks Bleddyn

  2. Vivek,

    I appreciate your article and the troubleshooting you engaged in. So often people encounter a hurdle and stop the project in the middle of the race rather than perservere, experiment, and achieve victory.

    As I prepare to put my first VM Server online this weekend I may find your tips helpful.

    Thanks

    Jim

  3. Ravi said

    Hi Vivek,

    Thanks for such great tips.

    I have one question:

    Basically I want to go for machine which will host 3-4 Virtual machines and the OS for these Virtual machines most prferably be of UNIX flavour. And these virtual machines will server as database machines using oracle. Out of these 4 VMs 2 will be used for oracle rac.

    So can you advise me with which configuration of host machine I should go ahead? Like: processor type,disks & RAM

    Regards:

    Ravi

  4. Ravi said

    Hi Vivek,

    Thanks for such great tips…

    I have one question:

    Basically I want to go for machine which will host 3-4 Virtual machines and the OS for these Virtual machines most prferably be of UNIX flavour. And these virtual machines will server as database machines using oracle. Out of these 4 VMs 2 will be used for oracle rac.

    So can you advise me with which configuration of host machine I should go ahead? Like: processor type,disks & RAM

    Regards:

    Ravi

  5. Jim Evans said

    I run an 1GB XP Guest in a 3.6GB 32 bit XP host. Once the host memory got to 1GB either host or guest would stall as the disk would thrash for 10 of seconds at a time. Once I found these tips, I have a “new machine” and my sanity is coming back

    Regards
    Eclectic Sol, Cheshire UK

  6. cheap vpn said

    uk vpn…

    […]Improving VMWare Server performance on Windows XP « Vivek Agarwal’s Portal/Java Blog[…]…

Sorry, the comment form is closed at this time.

 
%d bloggers like this: