Optimization in virtualization - Springer Link

3 downloads 0 Views 428KB Size Report
age capacity utilization, enable interoperability between heterogeneous storage devices and support non disruptive hardware change. Server Optimization ...
92

Ms. Sonali Ajankar, Mr. Ashish Mohta, Mr. S. S. Sane

Optimization in virtualization Sonali Ajankar

.

Ashish Mohta

.

S. S. Sane

Department of Computer Technology, Veermata Jeejabai Technological Institute Mumbai, India

1. Introduction Virtualization is becoming a core business strategy from desktop to data centre. It can provide an isolated execution environment to applications, support share and reuse of hardware resources. The cost reduction and simplicity of management are the prominent advantages. It can help to deliver high priority business services more quickly. Enhance energy efficiency. Optimizing the various resources with virtualization helps to improve organization efficiency. Here, the various optimization methods like desktop, server, network and storage are included. Optimization is the process of making something more efficient or optimal. Optimization is about virtualization of storage, servers and move towards on demand computing. Desktop optimization enables organizations to centrally define virtual machines (VMs) and assign these VMs to authenticated users to run on their PCs. It offers temporary access to a corporate desktop, and provides higher security for corporate applications and data. The major part of overhead in Xen’s network performance degradation was caused by the long data transfer path as well as the repeated VM EXIT that leads to trap in Xen hypervisor in a HVM domain. By shorten the data transfer path and optimize the interrupt deliver route, the network virtualization performance was improved. After that, evaluate three techniques for optimizing network performance. First, redefine the virtual network interfaces of guest domains to incorporate high-level network offload features available in most modern network cards. Second, optimize the implementation of the data transfer path between guest and driver domains. The optimization avoids expensive data remapping operations on the transmit path, and replaces page remapping by data copying on the S.J. Pise (ed.), ThinkQuest 2010, DOI 10.1007/978-81-8489-989-4_16,

© Springer India Pvt. Ltd. 2011

receive path. Finally, provide support for guest operating systems to effectively utilize advanced virtual memory features such as super pages and global page mappings. The overall impact of these optimizations is an improvement in transmit performance of guest domains by a factor of 4.4. The receive performance in guest domains improves by 18%. Storage Optimization can help to identify storage inefficiencies and areas for improvement and help design and build a virtualized storage solution that can increase storage capacity utilization, enable interoperability between heterogeneous storage devices and support non disruptive hardware change. Server Optimization becomes necessary because there is need for fully realizing the benefits of sever virtualization, also organizations require expert planning, design and implementation for their virtualization projects The following figures show a simple comparison of three applications running in a regular computer versus a virtualized computer. In Non-virtualizes computer operating system directly run on the hardware as shown in Fig. 1. In virtualizes computer a VMM layer placed between hardware and operating system as shown in Fig. 2. Here the guest operating systems may be the same or different.

Fig. 1 The non-virtualized computer

Optimization in virtualization

Fig. 2 The virtualized computer

In virtualization number of operating system can be run on the same computer at the same time. It provides the security as applications running on different VMs do not interfere with each other. This paper first gives the overview of virtualization. The section 2 deals with the desktop virtualization optimization then in section 3 describe the different methods of optimization of network virtualization then storage virtualization optimization is cover in section 4 and server virtualization optimization describe in section 5. 2. Desktop virtualization optimization Desktop virtualization is a server-centric computing model that borrows from the traditional thin-client model but is designed to give system administrators and end-users the best of both worlds: the ability to host and centrally manage desktop virtual machines in the data center while giving end users a full PC desktop experience. Desktop optimization is intended to deploy legacy applications to users running a newer desktop OS, such as Vista or Windows 7, or for restricted or temporary use by users such as contract workers [8]. 2.1 Working Desktop optimization management tools enable administrators to deliver and manage VMs centrally, and control when users can access them, while a technology called Trim Transfer makes VM distribution and patching practical over corporate networks. Its client can make virtualization transparent to PC users. 2.1.1. Managing Desktop VMs: Administrators use a management console to assign VMs stored in the central repository to authenticated users by defining workspaces using Active Directory. A workspace is a VM configured to run in Virtual PC along with a usage policy, such as who is authorized to use the VM, when they may use it, when the

93

authorization expires. Desktop optimization applications do not require installation or configuration by the end user and workspaces can be deployed via its server; by using automated tools, such as System Centre Configuration Manager; by downloading over the Internet. These clients then manage the execution of the VM on the local computer, in compliance with the policy defined by the administrator. Once provisioned on a client PC, VMs can run disconnected from the corporate network. Applications are protected by authentication and policy, and their use may be revoked either when the client agent contacts the server for updates to the workspace or after a specified, resettable expiry period. The latter is useful when a PC is used remotely with only occasional connection to the corporate network. The Desktop Optimization Management Server also aggregates clients events, such as who has used an application and what errors might have occurred, and stores them in a centralized SQL Server database for monitoring and reporting. 2.1.2. Trim Transfer for Fast Deployment: Because VHDs (Virtual hard disk) are large, desktop optimization uses incremental data transfer technology called Trim Transfer for distribution of VM images, cutting down on network traffic for both the initial deployment and updates. Transfers run in the background, when network and CPU resources are not needed by other applications. Trim Transfer uses existing local files to build the VM image, some resources required by the VM (e.g., system and application files) already exist on the client computer. Trim Transfer scans the local hard drive, compares the result with what is needed in the VM, and uses the network to transfer only those files that are different. Microsoft says this delivers significant savings for many applications; for example, approximately 40% of the files needed for office installations on Windows XP are also needed for Office on Vista, so in the case of a VM that runs Office on XP that is transferred to a computer running Office on Vista, Desktop optimization transfers only the differences and uses files already on the client for installation. When updating to a new image version, only the blocks of the VHD that has changed are downloaded, not the entire VHD, significantly reducing the required network bandwidth and delivery time. The client guarantees the integrity of the final image by ensuring that the local blocks to be used are bit-by-bit identical to those in the desired VM image. 2.1.3. Hiding the Virtual PC and the OS: Desktop optimization application is more transparent and simpler for the end user than Virtual PC 2007. Although it provides a complete computer as a VM running in Virtual PC, administrators can configure to hide the Virtual PC and the VM’s guest OS desktop so that end users see applications as if they were running natively on the PC; they do not have to manage the Virtual PC or install VMs. Desktop optimization

94

Ms. Sonali Ajankar, Mr. Ashish Mohta, Mr. S. S. Sane

applications can be started from the Windows Start menu or from an icon on the host desktop, and users are only aware that the application is running in a VM. 2.2

Advantages

Desktop optimization simplifies desktop management, but it confers some unique advantages. The technology removes a barrier to OS upgrades, strengthens centralized management of applications, offers temporary access to a corporate desktop, and provides higher security for corporate applications and data. 3. Network virtualization optimization 3.1

Xen network I/O architecture

Xen is a virtual machine monitor for IA-32 (x86, x86-64), IA-64 and PowerPC 970 architectures. It allows several guest operating systems to be executed on the same computer hardware concurrently. Xen uses a spit driver model, among all domains running on Xen, only domain0 has direct access to physical I/O devices. It performs I/O operations on behalf of the other domain. In order to access device, guest OS sends request to the Frontend and Frontend will transfer request to the corresponding Backend. In this way, each data transmit or receive operation must go through domain0, which makes the network I/O virtualization architecture in Xen a bottleneck for networking performance. 3.1.1 Data Transfer: The performance is even worse for a HVM (Hardware virtual machine) domain without Front driver like windows. Fig. 3 shows the network send packet flow in a HVM domain:

Fig. 3 Xen network virtualization I/O process flow

• When a guest domain (domain), sends data packet, the In/Out instruction will trigger VM Exit, control will transmit from guest domain to Xen. A function will be called to handle VM Exit. If this function can handle it directly, the process will be finished immediately. • Xen writes the detail information of the In/Out instruction to a shared page between Domain0 and DomainU, and then notifies domain0 via event-channel. After this, Xen will block DomainU and schedule other domains to run. • Xen restores domain0 and transfers control to domain. • The first function on domain0 to be called is the callback function hypervisor_callback, which will call evtchn_do_upcall to collects I/O request from domainU. • gevtchn_do_upcall will trigger the select system call in switch and then call I/O request handle function cpu_handle_ioreq. The latter will call cpu_get_ioreq to get the I/O request information in the shared page. • DM figures out what kind device the request wants to access, and calls the corresponding callback function registered when the device was initialized to process the request. • Those call back function were executed to send/ receive data through the physical driver in domain0. • When the data transfer finished, DM will notify Xen that the data transfer has been completed. Xen will unblock domainU when it gets the notification, and then domainU can run again. 3.2 Overview of optimized network architecture Shared I/O page data structure in Ioreq.h is used to store the information of I/O requests and the process results of those requests. Both Xen and domain0 have direct access to this shared I/O page. The following optimizations algorithmic steps were based on this feature: • Move Ne200State to the shared I/O page. So that both Xen hypervisor and Domain0 can access it directly. • Change the original way to access the Ne2000 virtual NIC. • Move the functions that read registers and write state registers to Xen hypervisor. • Add a simple switch in Xen hypervisor. For judging whether this optimization driver can handle the requests from a HVM guest domain. The overall optimization model changes only a little part of Ne2000 virtual NIC and adds a small patch to the Xen hypervisor. It does not affect the reliability and performance of Xen hypervisor. By moving the state information of Ne2000 virtual NIC to I/O shared page, a lot of register read operations and state register I/O requests can be processed in Xen directly. This model reduces the switches between Xen and domain, shortens the data transfer path, and improves the Ne2000 virtual NIC performance.

Optimization in virtualization

3.2.1. Data Transfer Flow: Fig. 5 describes the work flow of the optimization model. Taking data transfer as an example, the optimization model works in the following way: • When the HVM guest domain sends data packet to other machine, it will write the control register or state register of Ne2000 virtual NIC. IN/OUT instruction will cause VM Exit and traps in Xen. • Xen gets control of CPU and calls function vmx_ vmexit_handle, which will read reasons of VM Exit from VMCS structure. The hypervisor will get the detail information about the I/O operation, such as I/ O type, I/O port address, data length, etc. vmx_vmexit_handle will call vmx_io_ instruction to handle I/O operations, which will invoke send_pio_req function later. • Send_pio_req will analyze the I/O request information and call the new switch to judge whether this request can be handled by this model. • Described as the dashed line in Fig. 5, if the request can be handled in Xen, the request will be sent to the modified Ne2000 I/O functions immediately, and the results will be written to the shared I/O page. As soon

95



as this process finished, it will notify Xen hypervisor. It is observed in Fig. 5 that the data will flow in the dashed line. Hence the data transfer path is greatly shortened compared with the original model. If this request cannot be handled by Xen alone, the switch places the I/O request in the shared I/O page and notifies domain0 to handle it by the original way shown in Fig. 3. Compared Fig. 3 with Fig. 5, this optimization model greatly shortens the data transfer path by intercepting I/O requests and handling it immediately. In this way here reduced the switch between the Xen hypervisor and domain0, which is the major reason for the high performance degradation, and thus improved the performance of Xen network virtualization.

3.3 Experimental results and evaluation The optimization model improved the throughput with the average of 1.56. The experiment shows that when sending small records, the latency of the optimized virtual NIC is also improved. TLB misses does not concentrate on several functions but scatters in domain [5]. Due to the increase of throughput, the data transfer time is greatly reduced. The CPU overheads are reduced by 73%. The reasons of CPU overheads improvements lie in the shortening of I/O transfer path and the reduction of cache miss. These result shows that modification made to the previous architecture are very advantages. As it improve overall network performance. 3.4 Another methods of network optimization

Fig. 4 Optimization architecture overview

This paper presents another three optimizations to the Xen network virtualization architecture to address network performance problems identified in guest domains namely 1. Virtual interface optimization 2. I/O channel optimization 3. Virtual memory optimization

Fig. 5 Data transfer flow in the optimized model

These optimizations fall into the following three categories: First optimization is to redefine the virtual network interfaces of guest domains to incorporate high-level network offload features available in most modern network cards. For that add three capabilities to the virtualized network interface: scatter/gather I/O, TCP/IP checksum offload, and TCP segmentation offload (TSO). Scatter/gather I/O and checksum offload improve performance in the guest domain. Scatter/gather I/O eliminates the need for data copying by the Linux implementation of sendfile (). TSO improves performance throughout the system. In addition to its well-known effects on TCP performance benefiting the guest domain, it improves performance in the Xen VMM and driver domain by reducing the number of network packets that they must handle. These capabilities also improve the efficiency of the virtualization path connecting the virtual and physical network interfaces.

96

Ms. Sonali Ajankar, Mr. Ashish Mohta, Mr. S. S. Sane

Second, optimize the implementation of the data transfer path between guest and driver domains. For that introduce a faster I/O channel for transferring network packets between the guest and driver domains. The optimization avoids expensive data remapping operations on the transmit path, and replaces page remapping by data copying on the receive path. Finally, provide a new memory allocator in the VMM which tries to allocate physically contiguous memory to the guest OS. These mechanisms allow guest OSes to make use of superpage and global page mappings on the Intel x86 architecture, which significantly reduce the number of TLB misses by guest domains. Overall impact of these optimizations is an improvement in transmit performance of guest domains and the receive performance of the driver domain of native Linux performance. Emulating TSO in software in the driver domain results in higher network performance than performing TCP segmentation in the guest domain. The receive performance of guest domains remains a significant bottleneck which remains to be solved.

server into multiple virtual environments, called virtual or private servers for example Web servers. Instead of requiring a separate computer for each server, dozens of virtual servers can co-reside on the same computer. Server virtualization can facilitate the alignment of IT to business objectives. It can play a major role in IT optimization. It can act as a key building block in a SOA environment; also contribute to the greening of data centre. Helping to lower the TCO including costs associated with hardware purchases, maintenance and facilities [10]. While it’s clear that x86 server virtualization can deliver many benefits, there’s a catch. To fully realize these benefits, organizations require expert planning, design and implementation for their virtualization projects and that’s where Server Optimization and Integration Services come in. 5.1 Building a virtualization business case

In a optimization reallocate storage space dynamically to support fluctuating workload conditions and develop a storage architecture governance model so implement changes to existing storage management processes such as capacity planning and provisioning, helping to dramatically improve overall storage capacity utilization. It also improves device utilization levels, reduces storage management complexity and overall costs, facilitates interoperability and more “open” storage systems, enable resource consolidation.

Server Optimization and Integration Services starts with a solution framing step that can help answer a key question: What can x86 server virtualization accomplish in the IT environment? The solution looks at business readiness and recommends strategies for supporting a shared service model. Working with the business and technology managers and IT architect documents current business processes surrounding server purchasing, provisioning and management. This review details budget allocation and how budgets are currently assigned to projects and to the common infrastructure. The architect also documents current operational and support model for change management, help desk and support staff roles, along with training needs and any internal service level agreements. Next, the architect assesses backend infrastructure components—for example, storage, network, backup, systems management, security and time synchronization—to help ensure that they can support virtualization. The architect also reviews and documents current environment and makes recommendations for essential changes. The architect can gain a clear understanding of the environment and the various systems’ configuration and utilization. The architect also analyzes business, infrastructure and workload constraints in order to accurately calculate the size of a potential virtualization platform. Finally, the architect assesses the virtualization host server to determine if it is large enough to deliver acceptable levels of services to all guests. The architect also performs a detailed hardware inventory and performance utilization analysis for suitability within a virtualized environment.

5. Server virtualization optimization

5.2 Detailed design

Server virtualization means the partitioning of a physical server into smaller virtual servers. In server virtualization the resources of the server itself are hidden, or masked, from users, and software is used to divide the physical

To produce a virtual infrastructure design that meets specific requirements, the IT architect performs a second step, plan and design, which produces a detailed design document that sets naming and security standards, defines the disk

4. Storage virtualization optimization Storage virtualization is the pooling of physical storage from multiple network storage devices into a single storage device that is managed from a central console. Storage virtualization is commonly used in a SAN. The management of storage devices can be tedious and time-consuming. Storage virtualization helps the storage administrator perform the tasks of backup, archiving, and recovery more easily, and in less time. With Storage Optimization gain access to trained consultants and architects who can help identify storage inefficiencies and areas for improvement and help design and build a virtualized storage solution that can increase storage capacity utilization, enable interoperability between heterogeneous storage devices and support non disruptive hardware change [9]. 4.1

Optimizing storage utilization

Optimization in virtualization

and network structure, and documents any required system tuning elements. This document includes the security and administration model backup methodology host physical and virtual disk layout, specifically file system structure and dedication of disks to guests, where applicable virtual network topology structure and format, plus interconnection with the physical network, host server hardware specification, virtual machine distribution among hosts, processes and procedures for ongoing management, implementation tables and configuration settings. 5.3

Services

Server optimization offers the optional custom services for post implementation support includes operational support which provides services like monthly “health checks”, thirty hours of engineering support per month, optional four-hour emergency response service and provide full remote management services like new guest provisioning, host hardware support, virtualization software support, status monitoring, performance and capacity management, documentation, security management, system software support, system backup and recovery, infrastructure resilience and operational processes.

97

and implementation processes, paper presents worldwide various optimization methods, as well as proven reference architectures and best practices to accelerate the installation of new Extended and Optimized Deployment of software. Hence, this area of virtualization is one of the interesting areas which introduce the industry and application oriented work in academic environment. References 1. 2. 3. 4. 5.

6.

7.

6. Conclusion Many organizations want to increase the performance and reduce the cost and complexity of their application-hosting infrastructures. This efforts increase virtualization optimization and decrease power consumption while having capability to increase their overall system utilization. Along with providing industry-leading expertise and using good methodologies and tools to speed design

8. 9.

10.

Virtualization, from Wikipedia, the free encyclopedia R.P. Goldberg, “Survey of Virtual Machine Research,” Computer, June 1974, pp. 34–45 Virtualization and virtual Machine by Silpa Jain The Optimization of Xen Network Virtualization,& by Zhand Jian, Li Xiaoyong, Guan Haibing Diagnosing Performance Overheads in the Xen Virtual Machine Environment,& by Menon, J. R. Santos, Y. Turner, G. J.Janakiraman, and W. Zwaenepoel. In First ACM/USENIX Conference on Virtual Execution Environments (VEE’05), June 2005 Optimizing Network Virtualization in Xen,& by Aravind Menon, Alan L. Cox, Willy Zwaenepoel. In Proceedings of the 2006 C. Waldspurger. Memory resource management in VMware ESX server. In Operating Systems Design and Implementation (OSDI), Dec 2002 Enterprise Desktop virtualization Joins Optimization Pack&, publish on Monday, 18 May 2009 IBM Storage Optimization and Integration Services – storage virtualization, Produced in the United States of America 11-07 IBM Server Optimization and Integration Services – VMware server virtualization, Produced in the United States of America 05-08