RedHatRHEL6 kernel Optimization

Source: Internet
Author: User
In RHEL6, RedHat will only support kernel virtual machines (KVM. KVM will exist in the kernel as a single module, which means that the KVM virtual machine runs on the basis of this module in the form of a process. This makes it much easier to manage virtual machines. To maximize the Linux virtualization server optimization, RHEL6 has made some improvements to the kernel. This article briefly describes some of the most important improvements. KVM virtualization technology provides the next-generation virtualization solution for RHEL6. Because KVM is updated more than Xen

In RHEL 6, RedHat will only support kernel virtual machines (KVM. KVM will exist in the kernel as a single module, which means that the KVM virtual machine runs on the basis of this module in the form of a process. This makes it much easier to manage virtual machines. To maximize the Linux virtualization server, RHEL 6 has made some improvements to the kernel. This article briefly describes some of the most important improvements.

KVM virtualization technology provides the next-generation virtualization solution for RHEL 6. Because KVM is more effective than Xen updates, RedHat will discard Xen in RHEL 6 (but it will provide a method to port Xen virtual machines ).

Optimized Process Processing

The RHEL process can be organized in a bucket: the entity that can allocate CPU and other resources. Because the virtual machine runs in the form of a process, this attribute also becomes part of the virtual machine running mechanism.

To enable the VM to run smoothly in KVM, every virtual CPU is processed by the scheduling program as a thread. For effective scheduling, the kernel enables a new operation mode, "guest mode ". A virtual guest cannot directly call the Linux kernel (a process in the system mode is acceptable), but it can use the management call to communicate with the management program. This new operation mode makes full use of new features of the Linux kernel, such as scheduling, counting, and KSM ).

Improvements in hardware support

Kernel upgrades are only part of KVM performance. The other part lies in the hardware itself. The RHEL 6 kernel can take full advantage of several functions fully implemented by hardware. First, there is an extended page table (EPT) for CPU support ). This feature reduces the need for simulation and enables the virtualization service to run faster. Next, the AMD environment is called IOMMU and the Intel environment is called VT-d. This feature allows you to safely and directly use physical I/O devices, while protecting the same devices from unexpected use by other users. This protection is necessary because if a user writes data to an occupied device, the host may crash.

Another important feature is SR-IOV. This function is a virtual I/O interface on the PCI bus that securely shares real hardware. This feature is especially important for network adapters and allows a physical device to provide virtual devices that can be used by multiple Guest users at the same time. The last important hardware function that can be used in a virtual environment is NPIV. This feature allows shared storage devices, which means that each user can use part of the storage device.

The RHEL kernel has been enhanced to take advantage of the improved features on these hardware. For example, CPU enhancement allows users to allocate more than 64 CPUs. In addition, due to the "Lock" feature of the kernel RCU synchronization mechanism, there is actually no lock, it is just a mechanism to avoid locks and improve performance in an SMP symmetric multi-processor environment-the number of CPUs that can be allocated has a minimum value.

RHEL 6 also has some memory enhancements. First, the first enhancement is transparent large memory paging. This means that the large memory paging (allowing the kernel to allocate a large memory block instead of a small 4 kb block) is dynamic. Therefore, you do not need to execute a paging plan for the memory when the system starts. Another advantage of KVM is kernel same-page merge. This function allows multiple virtual machines to access the same management page at the same time, purge all memory pages in the startup phase, and improve the performance of Windows virtual machines.

The next improvement is block I/O. The first is local asynchronous IO and preadv/pwritev system calls. With this, you can combine the desired memory areas before reading/writing to Improve the Performance in multi-threaded environments. The kernel now supports MSI interruption. MSI interruptions are closely related to PCI devices and allow you to work on multiple parallel disconnections. Another improvement is block alignment. Now, the default value of block alignment is optimized to improve the system performance. All of these improvements aim to provide excellent kernel-level performance.

Some special I/O Enhancements also bring benefits to the performance improvement of network interfaces. The most important enhancement is to move part of the network space from the user space to the virtual host network in the kernel space. This is very useful for virtio drivers. The virtion driver also provides better network performance for KVM users and allows users to use the TAP driver to communicate with virtual devices. The advantage of using the VM network is that it is directly attached to the kernel, So it provides much better performance than the qemu method that needs to be simulated.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.