Portal Home > Knowledgebase > Tutorials > 30 VMware vSphere Performance Tips

30 VMware vSphere Performance Tips

You most likely chose VMware’s vSphere as your virtualization solution due to it’s reputation as a solid and performant product; however, without proper attention and optimization you will not fully utilize the capabilities of the platform.  There’s a multitude of optimizations that can be made to make your vSphere setup perform at optimal levels .  This article covers 30 tips and tricks that will ensure the best performance from VMware’s vSphere and some even apply to other virtualization products.

1. Use only VMware-compatible hardware

VMware maintains a hardware compatibility list for each of the versions of their vSphere platform.  Before purchasing or attempting to use any hardware configuration you should first make sure that all of the components are properly supported.  You also need to make sure that your hardware meets the minimum configuration necessary for proper installation and operation.

2. When possible use newer hardware with hardware-assist features

Recent processors from both AMD and Intel include features that allow the hardware to assist VMware in it’s virtualization efforts.  Hardware assistance comes in two forms: CPU virtualization and memory management virtualization.

3. Run your system through a burn-in/stress test

When building or buying a new system for use in a server capacity it’s always a good idea to run the system through a thorough stress test or burn-in period.  Various software exists that allows you to do this and many are available as live CDs that you can boot and run the system through it’s paces.  This helps to weed out faulty components and will allow you to ensure a solid platform when you switch the system to production.

4. Choose appropriate back-end storage given the application

Many diverse systems exist for back-end storage and your choice of technology can have a tremendous impact on the overall performance of your system.  Disk I/O is one of the major sticking points remaining in the computer hardware industry and has been one of the slowest to grow.
The choice of back-end storage devices and configurations depends on the type of applications you will be running.  Commodity SATA drives in the server itself for instance will not suffice for high-speed writing to disk of large data sets produced by scientific equipment.  If you have a need for high-speed or high-volume storage you may want to consider some of the more robust and effective storage mediums such as iSCSI or NFS.  You storage must be able to handle the required volume and read/write times for your applications to function smoothly while also accommodating the overhead of the host operating system and the vSphere system itself.

5. Use server-class network interface cards

Not all network interface cards are created equal; built-in adapters tend to only support the needs of run-of-the-mill users.  For enterprise-grade servers you’ll want to use server-class NICs that support checksum offloading, TCP segmentation offloading, the ability to handle 64-bit DMA addresses, the ability to handle scatter gather elements occurring multiple times within a single frame, and jumbo-sized frames.  These features will allow vSphere to make use of its built-in advanced networking support.

6. Optimize your servers’ BIOS settings

Motherboard manufacturers ship their product with the BIOS configured to function in a variety of configurations and because they have to support so many different configurations they’re not able to optimize the motherboard for your hardware configuration.  You should always update your BIOS to the latest version and then enable hardware assists that vSphere will use such as Hyperthreading, “Turbo Mode”, VT-x, AMD-V, EPT, RVI, etc.  Power saving modes should also be disabled as they have adverse effects on server performance.

7. Provision virtual environments with only the resources that they require

It may seem counter-intuitive but when in virtualization systems over-allocating resources to your virtual machines comes with a performance penalty.  VMware in particular copes very well with overloading the system with too many virtual machines but it’s not very good at handling machines that waste resources.  Start with the recommended/default settings for memory, storage, etc and then only adjust them as a need presents itself.  The management console will tell you when there’s an issue with resources and you can act on these alerts as needed.

8. Remove unused and unnecessary virtual and/or physical hardware from the VM

By disabling devices you are freeing up interrupt resources.  You also will get an increase in performance by disabling devices that consume extra resources due to polling such as USB adapters and PCI devices which reserve blocks of memory for their operation.  Also, when using Windows guests be sure to disable optical drives as Windows constantly polls them which can cause issues especially when multiple guests are doing so simultaneously.

9. Monitor CPU usage in your host environment

Keep track of the CPU usage of your entire virtualization setup via your console so that you can see when the system is over-allocated.  You then have the choice to migrate VMs to other hosts in your network, to move resource hogs to less-densely-populated hosts, or to disable VMs that are no longer in use or necessary.  As a general rule of thumb VMware states that if the system average load is equal to the number of physical processors that the system contains that you are over-allocating your resources and have too many guests on your server. You can use Monitis Server Monitoring for CPU monitoring in your vSphere host environment.

10. Limit your use of virtual CPUs to appropriate applications

If you are using applications that are single-threaded or not properly designed to leverage multi-threading and parallelism it makes no sense to use virtual CPUs.  Unused virtual CPUs will continue to consume system resources even if they are not being used by the system.

11. Enable Hyper-Threading if your hardware supports it

Hyper-threading is a technology that was developed to keep a steady stream of instructions being ran through your processor’s pipeline.  Unlike multiple processors which allows for multiple instructions to be executed simultaneously HT reduces processor idle time and gets you more work performed for each of your clock cycles.  There is no set and fast rule for the gains to be achieved via HT but for some applications it can more than double performance.

12. Provide your host with a proper amount of memory for guests and for console overhead

When choosing how much physical memory to place in your host systems and how many guests to configure you need to total up the amount of memory that each VM will require.  To this figure you will also need to add a buffer for overhead on the VM as well as the overhead required by vSphere itself.  When unsure err on the side of slightly more physical memory than is required.

13. Choose application-appropriate filesystems and virtual disk types

Virtual disk types and filesystems offer different performance profiles and should be chosen based on the I/O needs of your individual applications.  If you have an application which constantly is writing files to disk for instance you’ll want a filesystem that’s optimized for writes and a virtual disk to match.

14. Minimize the usage of applications that open and close files constantly or schedule them for periods of low disk I/O

Reading and writing files is the most expensive operation in computing.  To make the most of your resources you should schedule cron jobs and I/O heavy operations for periods of low system and network utilization.  If you are using I/O laden software during peak times you will experience often-times serious performance degradation.

15. Spread I/O loads across storage adapters and paths

If you have multiple storage adapters or storage paths (networked) you should divide the load across them evenly to keep your I/O layer from being overwhelmed.  I/O is one of the most important aspects of a system that affects performance.  Since storage controllers and devices are usually the last to benefit from advances in technology it only makes sense to use all available options to increase the performance of these less-than-ideal devices.

16. Use NIC teams for additional failover capability

NIC teams allow your network adapters to work together to provide more stable connectivity and to allow for fault tolerance.  If a network interface fails or is having issues the other interfaces in the team will automatically take up the slack and provide a smooth transition back to normal operation and performance.

17. Group systems that need to communicate with each other on the same virtual switch

By placing systems that have to communicate with each other on a regular basis you avoid the network overhead you would incur otherwise.  If the systems are on different virtual switches whenever they need to communicate the traffic must leave the system, exit the switch and travel across the network to get to the other system.

18. Only use guest operating systems that are supported by vSphere

VMware has optimized their host platform for use with a select group of operating systems and using those which have not be certified as compatible is asking for trouble in the support and performance department in a production environment.

19. Install and use the latest version of VMware Tools for each guest operating system

VMware Tools updates drivers and has optimizations that some of the native guest OS drivers do not have.  Also, whenever you update your host software you should also update VMware Tools.

20. Disable unnecessary graphical components in the guest operating system (screensavers, XOrg, animations, etc)

Extraneous components, especially graphical components, are not only resource hogs and usually serve no purpose in a server environment but can also introduce security vulnerabilities into your system.  Unless you have a specific need for graphical applications to run on the server you should disable all screensavers, window systems, window animations/decorations, etc.

21. Use NTP on your guests for timekeeping

While not necessarily a performance tip using the network time protocol (NTP) for timekeeping will ensure accurate system logs and will help when troubleshooting issues with security and performance.

22. Ensure that you align the partitions in your guests

Most disk-based file systems suffer performance penalties when partitions are out of alignment.  The procedures for aligning partitions varies from one storage vendor to the next.

23. Use VMXNET3 for your virtual network adapter on guests that have support for it

VMXNET3 reduces the overhead required for network traffic to pass between the virtual machines and the physical network.  These are what’s known as paravirtualized network adapters and can provide substantial performance boosts for most workloads.

24. Group virtual machines into a resource pool where appropriate

By grouping virtual machines into logical collections you can allocate resources for the group rather than for individual machines.  This also allows for the guests in a group to share resources and acts in a sort of load balancer capacity.

25. Disconnect vSphere clients from the vCenter when you don’t need them anymore

If you have too many managed clients connected to the VMware vCenter server you will notice a degradation of performance on the console.  Also, even though vSphere will continue to work when you exceed the recommended/supported maximum client count performance will take a substantial hit.

26. When using the Distributed Resource Scheduler group similar virtual machines (in terms of CPU and memory allocation)

Grouping machines with similar CPU and memory configurations allows for machines to be treated homogeneously and makes vSphere’s job of maintaining equilibrium and stability that much easier.

27. Shut down virtual machines that are not being used

Even virtual machines that are not in use consume resources.  While this will not give you enormous boosts in performance it will give you some.  You can always restart a guest once a need for the system presents itself again.

28. Use wake-on-LAN-capable hosts when possible to make power management easier

If your network adapters support wake-on-LAN consider using it to allow vSphere to help manage power usage.  When machines are not being utilized you can have them put into a suspended state and then reawaken when the demand for them exists.  This will help avoid wasting power and potentially save you a lot of money, especially if the load on your systems is cyclical.

29. Only enabled Fault Tolerance on the virtual machine if you will in fact be using this feature

If you will not be using the Fault Tolerance option that vSphere provides for guests you should disable it as it requires a fair amount of overhead in terms of memory, CPU usage, and disk I/O.

30. Use at least a gigabit network infrastructure

With network equipment and cabling prices so cheap these days it makes no sense to use less than gigabit for your network infrastructure.  If you can afford it or have a specific need for it you can opt to use even faster fiber optic transmission technologies and media to ensure fast and reliable operation with room for future growth and capacity.
These tips are just the tip of the performance iceberg.  I highly recommend that you further investigate the tips from the list which apply to your needs by reading the official documentation from VMware.  These tips and many more are covered in more depth and with more information for gauging applicability in the guides titled “Performance Best Practices for vSphere.”

Also Read