Solution provider takeaway: When increasing the performance of a virtualization environment, it is also important to perform a check-up on your clients' guest operating system. This chapter excerpt, from VMware ESX Essentials in the Virtual Data Center, provides tips on keeping clients' VMware Tools up-to-date and increasing performance on a Microsoft Windows and Linux guest operating system.
By submitting your email address, you agree to receive emails regarding relevant topic offers from TechTarget and its partners. You can withdraw your consent at any time. Contact TechTarget at 275 Grove Street, Newton, MA.
Configuration of the Guest Operating System
As mentioned earlier in this chapter, if you are trying to increase the performance of your virtualization environment, why wouldn't you attempt to tune your guest operating system? Just because this is a virtual environment, don't think that many of your normal operating system tweaks used in your physical servers isn't applicable here. They very well could be the case.
There are numerous books, Web sites and other informational sources available to you that help with common operating system tweaks. This section of the chapter cannot possibly cover them all. Instead, it will discuss some of the tuning options available that are specific to a virtual machine environment.
Make sure to use supported guest operating systems. VMware Tools may not be available for an unsupported guest.
Updating VMware Tools
As simple as this may seem, it is important to remember to keep your VMware Tools up-to-date inside your guest operating system.
You should always install the latest version of the tools in your virtual machine, and you should ensure that it gets updated after each VMware ESX upgrade or patch. There are times when update patches include fixes for components of VMware Tools, which would make these updates very important to your virtual machines. If you migrate or convert virtual machines from an earlier version of ESX or from another VMware virtualization platform, make sure to remove the old VMware Tools and then install the latest version for your platform. There are differences in the editions of VMware Tools from one VMware platform to the next. If you migrate or convert a virtual machine from another vendor's virtualization platform, make sure to remove that vendor's tools and replace them with VMware's.
By installing the VMware Tools in your guest operating system, you also get these performance enhancement capabilities:
- VMXNET driver -- As discussed earlier, VMware Tools provides a new updated and enhanced high speed networking driver to help improve networking performance.
- Improved video graphics driver -- VMware Tools installs an improved graphics driver which gives you better mouse, keyboard and screen performance. In a Windows virtual machine, enable the hardware acceleration feature under the advanced graphics display settings on the Troubleshooting tab. This will help smooth out the mouse when remoting into the virtual machine.
- BusLogic driver -- Installing VMware Tools updates the BusLogic SCSI driver within the guest operating system to the VMware supplied driver. This VMware version of the driver has certain optimizations that the guest operating system supplied driver does not.
- Memory balloon driver -- The balloon driver is part of VMware Tools and is used for memory reclamation on ESX. It helps to minimize ESX swapping by better managing guest memory. Memory ballooning will not work without Tools installed.
- Idler program -- An idler program is added for Netware guests to help de-schedule these guests when they go idle.
- Timer sponge -- An experimental timer sponge has been added to give a correct accounting of time within the guests.
- Time sync -- When VMware Tools are installed, a time synchronization feature is added to improve the time keeping function within the guests.
The time synchronization feature is not turned on automatically. Be sure to enable time sync between the ESX host server and the virtual machine from within VMware Tools. When using VMware Tools to do the time synchronization, you should not use another form of time sync within the guest operating system. Do not enable VMware Tools time sync for Windows virtual machines that are members of an Active Directory because they should time sync with a domain controller instead.
Microsoft Windows® Guest Operating System Performance
Many normal tweaks and tuning techniques used to increase the performance of a Microsoft Windows environment on a physical server can translate over to a virtual machine. And just like a physical server, not every virtual machine is alike -- so the tuning method used on one machine may not work the same on another.
The latest version of VMware ESX now supports 64-bit Windows guest operating systems as well as 64-bit applications. These 64-bit versions will typically have better performance than their corresponding 32-bit counterparts.
Defragmenting the contents of a virtual machine's hard disk can have a positive effect on its disk I/O performance. Using a third-party tool like Diskeeper can keep your disk structure well organized. Be sure not to schedule the defrag task during critical or normal business hours or else you might cause more performance problems than you fix.
You can free up resources within a virtual machine by stopping and disabling unnecessary services and background tasks. Make sure however that you don't disable a service that is needed by one of your applications. The following list contains a subset of common Windows services that can usually be stopped and disabled in a Windows virtual machine. This list should only be used as a suggestion until you know if a particular service is needed or not.
- Clip Book
- Computer Browser
- DHCP Client (Unless using DHCP IP addresses)
- Fast User Switching Compatibility (Windows XP)
- IMAPI CD-Burning COM Service (Windows XP)
- Indexing Service (Unless needed)
- Internet Connection Firewall (ICF) / Internet Connection Sharing
- IPSEC Services
- Network DDE
- Network DDE DSDM
- Network Location Awareness (NLA)
- Print Spooler (May be needed in some cases)
- Remote Desktop Help Session Manager
- Remote Registry (May be needed)
- Routing and Remote Access (May be needed)
- Smart Card
- SSDP Discovery Service
- System Restore Service (Windows XP)
- Telnet (May be needed)
- Uninterruptible Power Supply
- Windows Audio (Windows XP)
- Windows Image Acquisition (WIA)
- Windows Time (May be needed)
- Wireless Zero Configuration
If your guest operating system is Windows XP, you may want to disable the System Restore feature. Doing so will free up system resources like CPU, disk space and I/O. Instead, use the more powerful VMware snapshot feature.
Keep your Windows virtual machine as lean as possible. Uninstall any of the Windows components that aren't going to be used. Doing so will reduce the amount of memory and CPU consumed within the operating system, and will offer more resources to the applications installed in the guest. Power features such as hibernation and hardware power management (turning off hard drives, monitors, etc) really don't have much meaning in a virtual machine or add any value. Likewise, screen savers, visual effects and animations consume additional CPU resources unnecessarily and should be disabled. In most cases, you probably don't need desktop wallpaper on your virtual machine either. One exception to that might be to use something like Microsoft's Sysinternal BgInfo tool which can be very useful by offering system metrics and information as the desktop wallpaper.
Linux Guest Operating Systems Performance
Many normal tweaks and tuning techniques that are used to increase the performance of a Linux environment on a physical server can translate over to a virtual machine. And just like a physical server, not every virtual machine is alike -- so the tuning method used on one machine may not work the same on another.
The latest version of VMware ESX now supports 64-bit guest operating systems as well as 64-bit applications. These 64-bit versions will typically have better performance than their corresponding 32-bit counterparts.
The guest operating system timer rate found in the Linux kernel can impact the performance of a Linux virtual machine. Linux operating systems keep time by counting its timer interrupts. Unpatched 2.4 and earlier Linux kernels request clock interrupts at 100Hz or 100 interrupts per second. By default, some 2.6 Linux kernels request interrupts at 1000Hz while others do so at 250Hz. The overhead involved with delivering so many virtual clock interrupts can unnecessarily stress the virtual hardware and negatively impact performance. The only way to change the behavior is to reduce the number of ticks per second and then recompile the kernel. Where possible, it is best to try and use a Linux kernel that uses lower timer rates to avoid this problem.
If your virtual machine is running a server-class Linux guest operating system and X server is not required for the environment, disable it. Unnecessarily running X server and screen savers in your guest environment will consume extra resources that can negatively affect performance of the virtual machine or its host server. When you do need a graphical desktop, make sure you select a light-weight window manager.
When optimizing your Linux virtual machines, make sure that you disable or remove any unnecessary daemons, services and background tasks. At the same time, be sure to remove any unneeded packages as well. This will free up processor and memory resources that can be redirected to your applications.
Backups and Anti-Virus Configuration
Backup and anti-virus configurations will probably vary based on the use of your virtual environment. In other words, how you configure backups and anti-virus to improve performance in your environment will depend on if your virtual infrastructure is a production environment or a non-production environment such as test and development. A non-production environment may not need to have anti-virus software installed (unless you are testing the anti-virus solution or the effects of anti-virus solutions). However, if this is a production environment running a Windows guest operating system, you will probably be required to have an anti-virus package installed. In that case, it should be configured in the most optimal way in order to help maximize the performance of the virtual machine.
One of the first things you can do is to setup scheduled virus scans to take place during off-peak hours so that the applications in the virtual machine do not compete for resources with the anti-virus solution. Unless your organization specifies otherwise, in most cases, a single, daily virus scan should be adequate. Additionally, most servers typically do not need real-time virus scanning turned on since this can greatly impact server performance. Disable the real-time virus scanning features when possible for production virtual machines, especially those used as database or web servers. Also, most anti-virus solutions have the ability to exclude certain files, file types, and directories from being scanned. Some application file types, such as database data files, do not need to be scanned, and in fact doing so could destroy performance. You should also configure the anti-virus solution to exclude mission critical application files that are not high risk for virus infection. Swap files are also good candidates for exclusion.
If you are running a backup agent in your virtual machines, you should also schedule the backups to take place during off-peak hours, and equally important, not during a scheduled virus scan. Again, just as with anti-virus software, scheduling backups to take place during off-peak hours will help alleviate performance degradation from applications competing for resources with the backup solution. If your organization is using VMware VI3, it's also a really good idea to make use of VMware's Consolidated Backup feature or use a third-party application that leverages the technology. Doing so will help eliminate a lot of performance overhead within the virtual machines and on your network because the technology will offload much of the overhead onto your SAN and off of your host server.
If you decide that you don't want to perform any other optimization or tuning suggestion found in this chapter, at least consider upgrading your environment to the latest version of VMware ESX. Doing so will offer you immediate environmental optimization and give you additional tools with which to better operate and control your virtual infrastructure. Upgrading can make it even easier for organizations to virtualize their most resource intensive and demanding applications. Otherwise, each of these best practice performance enhancements can be viewed on a case by case basis as needed.
VMware ESX Server: Performance optimization
Configuration of the host server
Host server processor and memory performance
Host server storage and network performance
Configuration of the virtual machine
Configuration of the guest operating system
About the book
VMware ESX Essentials in the Virtual Data Center details best practices for ESX and ESXi, guides you through performance optimization processes for installation and operation, uses diagrams to illustrate the architecture and background of ESX and covers the two most popular releases, 3.0 and 3.5.