Optimizing the virtual environment Avoiding over-allocation of key resources

  
As the business transitions to next-generation virtualization technologies, the system consolidation ratio continues to increase, and the management of virtualized environments becomes more important. Newly added virtual machines (VMs) will put pressure on server resource allocation and may become a potential risk to network performance.

solve resource intensive programs are constantly improving. First, hardware vendors are constantly improving the amount of memory that physical hosts can support. Correspondingly, virtual machine software vendors are constantly updating their products to manage more memory.

Moreover, as more and more businesses to invest in the arms of desktop virtualization, they found ability to run more virtual machines on each physical server, because the virtual desktop relative to the virtual server, the required memory will be less. Memory has always been the biggest limiting factor in increasing system consolidation rates. Now, the memory problem has been basically solved, and the focus of attention has gradually turned to other areas that may cause performance bottlenecks - IOPS generated by network traffic.

Virtual Machine Optimization


The key to virtualized environment management is to ensure that network layer configuration does not create unnecessary competition, which is also the responsibility of all virtualization vendors. It is recommended that in any case, key resources should be avoided from being over-allocated.

If two high-performance networks deploy virtual machines on the same host server, sharing the same card, the result is self-evident. This will cause them to compete for network resources. Similarly, CPU and memory may also generate similar competition.

However, in some environments, this configuration is acceptable. If two virtual machines often communicate and transmit large amounts of data, it is feasible to deploy both on the same host in this case.

when two virtual machines to exchange data through the same virtual switch (the vSwitch) on a host, does not generate traffic in the physical data layer. All network communications are generated within the host. Under

this case, the bottleneck rate with no fear of physical NICs, and consider the speed of the CPU and the bus of the host server. Refer to the typical example of data transfer between the front-end Web and the back-end database server.

you will find that such a simple way to "avoid connections' applies to a lot of scenes, but the real network optimization requires administrators to have full understanding of the relationship between all the virtual machines. Most virtualization management software allows for the definition of relationships between servers by setting affinity and anti-affinity rules. (See Figure 1.)


You can create rule constraints to describe the relationship between virtual machines. For example, the database and the web server must be on the same host, and the virtual machine running Microsoft Active Directory must be deployed on different hosts. . This will bring enough application scalability and availability, and most vendors also recommend scaling out -- rather than scaling up to ensure availability and scalability.

virtual network availability, optimize the next step is to configure the virtual machine Caozuoxitong. Many virtualization providers offer optimized NIC drivers to improve virtual machine network performance.

example, VMware and has vmxnet2 vmxnet3 drive current, Microsoft Hyper-V owns a series of integrated network device (see FIG. 2). To be able to use these devices, you need to install the relevant integration plug-ins provided by the virtualization product.


The enhanced NIC driver reduces the number of CPU polls required by the host server to transfer network packets from the virtual environment to the physical environment. If not installed, it may affect the host's network performance and increase CPU overhead.

These drivers provide a separate paravirtualization feature for client systems, making virtual machines more virtualized (VM-aware) than before they are installed. Paravirtualization is an idea of ​​trying to make any part of the system more adaptable to a virtualized environment.

Not only that, these drivers typically also provide some advanced features to enhance network. If you want to adjust the system's maximum transmission unit (MTU) size, you must install an enhanced network driver and related tools.

Remember: For its part, virtualisation does not improve server performance. If the virtual machine can outperform the physical server, it is largely because the host server running the virtual machine is far superior to the physical server in all aspects, which depends on powerful external forces, such as faster use. A physical server that allocates more resources to a virtual machine, upgrades the storage system where virtual machine files are placed, and so on.

The optimization method for physical servers such as Windows or Linux is still applicable in a virtualized environment. So if you know how to modify the Windows registry to optimize TCP/IP performance, you can also use it in a virtual environment. Setting optimizations such as configuring firewalls and disabling unnecessary services can save network bandwidth and reduce application load, which works in a virtualized world.
Author: Mike Laverick Translator: Chen Dewen
Copyright © Windows knowledge All Rights Reserved