ITC-2

jasjas
WhydoweusevirtualizationScopev3.doc

image1.jpg

Scope: Why do we use virtualization:

· To shorten intro.

· Main body more on implications, faults, “how” and not just “what”.

· Main body: implications for developers, what they should know, HA, cluster…

· Add references throughout.

What is it, VMotion, HA, clustering, DR (active passive and active –active)

1. Introduction.

Although principles of computer virtualization have been known for many years - IBM and other mainframe companies have used it for at least three decades - VMware introduced their version of server virtualization in 1999. Implementation of server virtualization on a large scale was not attractive until various issues related to virtual server performance were not resolved and by the years 2008 – 2009 it started gaining momentum. Most non virtualized physical servers operate at less than 15 percent of capacity; this is not efficient, and in addition it introduces massive demand for space, power and infrastructure complexity. Virtualization addresses all these inefficiencies, but what is even more important that virtualization, introduced several highly useful programmatic features that improved server reliability, performance, and reduced dependency on the underlying single physical server. In the language of many technical writers, it became possible to “abstract from server hardware”.

2.Server Virtualization*

Server virtualization provides transition from traditional one-to-one architecture of x86 servers by abstracting the operating system and applications from the physical hardware, enabling a more efficient, agile and simplified server environment.

Server virtualization is the ability to present multiple independent servers (virtual machines), operating in software on a single physical server. Each virtual machine encapsulates operating system and applications. With server virtualization, virtual machines share the available physical resources such as CPU, network cards, disks and memory.

By design, all virtual machines are isolated from each other. This means that if an operating system of a virtual machine fails, performance of other virtual machines on the same physical server stays normal and they are not impacted.

*At GMO we use Vmware vSphere server virtualization, features and the performances described in this paper is based on this vendor system design.

Another central concept to understanding virtualization is hypervisor. The hypervisor is the virtualization layer that runs on the physical host computer and provides an operating system environment for multiple virtual machines. To support all the virtual operations, hypervisor allocates server resources, such as processor, memory, input/output, networking to support VM operations. Each VM Operating System supports specific applications running on the VM.

3.Virtual machine components.

Virtual machines typically have applications, an operating system, virtual and hardware resources.

Each virtual machine has virtual hardware elements associated with it. To the operating system (and applications installed on it), this virtual hardware appears as physical hardware. Diagram below compares physical and virtual servers (source – Emc)

Virtual CPU: a virtual machine is configured with at least one virtual CPU. (vCPU).

When a vCPU needs to run, hypervisor maps the vCPU to an available hardware CPU.

When several virtual machines are running together on a single host (or in a cluster), vSphere uses shares and limits. The shares and limits assure that each virtual machine is provided sufficient resources, such as CPU, memory, network and storage. Shares guarantee that a virtual machine is given a certain percentage of a resource, according to the defaults in place. Limits provide a hard ceiling for resource allocation, depending on the configuration of a virtual machine.

Virtual disk: VMDK: a VMware software representation of complete computer disk. For its operations VMDK needs access to a hard drive, typically provided by physical server (host).

vNIC: or network interface card, is implemented in software. vNIC is used by a virtual machine to provide virtual network interface. Multiple vNICs are typically associated with a single physical NIC. For increased resiliency, and improved connectivity additional physical NICs are recommended. These would be part of NIC teaming and are intended for dual connections to physical servers on one side and to different network switches on the network infrastructure side.

Virtual Memory: requires virtual memory space and memory space dedicated to individual applications In computer operating systems, paging is a memory management technique. A computer operating system stores and retrieves memory data from the secondary storage, for use in main memory. The data is retrieved in defined, equal size blocks that are called pages.

To accomplish this each memory space is partitioned and each block of memory is assigned an address. As part of the virtual memory system, the operating system and hardware handle the address translation between the virtual address space and the physical address space. This technology not only simplifies the programmers work, but also adapts the execution environment to support large address spaces, process protection, and the mapping and swapping of memory in modern computer systems.

For more details on memory management technology and how it is used in GMO, please see appendix 1 at the end of this paper.

4. VMotion: Ability to move virtual machines. (to add VMotion performance, delay, and operations between data centers).

Inroduced in 2003, vMotion became recognized as one of the most important virtualization features and is an essential part of many virtualization techniques. vMotion enables the live migration of running virtual machines from one physical server to another. The virtual machine retains its network address and connections, which ensures ease of migration process.

VMotion keeps the transfer period transparent to users by tracking on-going memory transactions in a bitmap. Once the entire memory and system state has been copied to the target vSphere host, vMotion suspends the source virtual machine. It copies the bitmap to the target vSphere host and resumes the virtual machine on the target vSphere host, thus ensuring transaction integrity. This results in a zero down time and continuous service availability. Assuming gigabit network capacity, the entire process typically takes one or two seconds.

Based on vMotion automation migration capability, it is possible to schedule automatic migrations at a pre-defined times. For example migrations of multiple virtual machines can be scheduled between data centers. Since the introduction of vSphere 5.1, an entire virtual machine can be migrated between hosts, between clusters or even between data centers.

5. Clustering, High Availability, Dynamic Resource Scheduling, Distributed Power Management. (to expand this section)

One of the most important elements in VMware virtual infrastructure is the ability to maintain higher availability (HA) by using clustering. A cluster is a group of servers that work together, share computing resources, provides load balancing, improved reliability and performance. In addition clustering provides virtual machine balancing based on dynamic resource scheduling (DRS).

Dynamic Resource Scheduling (DRS) is a load balancing feature. That means that if there are several hosts in a cluster, the virtual machine can be moved to a server that is most suitable from the load optimization perspective. In addition DRS monitors available resources to support virtual machines’ operations. Based on the goals set by administrators, DRS migrates virtual machines within the cluster to maximize virtual machine performance.

High availability (HA) leverages multiple physical servers configured as a cluster to provide recovery from outages and high availability for applications that are running in virtual machines. Virtual machines operating systems are included in high availability resource pool.

Within clustered group of servers, HA provides protection:

1. against physical server outage

2. virtual machine failure

image2

1.When a physical server goes down due to loss of power or network connectivity, VMware HA restarts the virtual machines that are no longer accessible. This allows the virtual machines to be operational again. It will take only a short time, a couple of minutes, that are needed to reboot the virtual machines from storage.

It is important to understand that some loss of state is unavoidable and the actual impact depends on the nature of application. Information that existed only in the memory of the failed server will be lost. Virtual machine will restart on another physical host, but will not be able to reproduce the complete state of virtual machine that existed at the time when the host (server) failed.

2.Virtual machine failure: after HA cluster is installed, all virtual machines in the cluster are protected. HA detects the failure automatically and resets the affected virtual machine on the same physical server. Any application running in a virtual machine has access to increased availability. By monitoring virtual machine heartbeats and restarting non responding virtual machines, HA protects against virtual machine operating system crashes. (to describe heart beat for VMs and for cluster hosts)

VMware vSphere 5.5 provides an even greater level of high availability (via vSphere App HA) which allows recovery from application or operating system failures. On top of that, vSphere Flash Read Cache enables the virtualization of server side flash to lower application latency, and vSphere 

image3.jpg

Availability of the above HA features means that any operating system and applications can have high availability just by being part of a virtual machine. The only requirements to have HA features possible are installation of at least two physical servers, VMware software, and a shared SAN or NAS storage between the servers.

VMware High Availability system can be more resilient with multiple networking paths. Besides networking connectivity between storage and servers, HA has no external dependencies (no DNS or other components dependencies).

6. Virtualization and DR ( to add or another paper?)

Conclusion (to rework this part, a quick summary from a high level perspective):

Virtualization provides a considerable performance and productivity improvements for any enterprise. The advantages of virtualization described in this paper are only a part of the overall data center improvements that are planned at GMO. With further work in applying virtualization to other areas of the data center architecture are expected to provide further productivity benefits, but this would be the topic for another paper.

Appendix 1.

Virtual Memory Management

The total amount of memory configured for each VM can exceed the host physical capacity. For example it is possible that a host with 8GB memory would support eight VMs, each with 2GB configured memory. This is called memory over commitment. Memory is treated as a common pool and allocated dynamically. At the same time, if memory usage spike occurs, we would need memory optimization techniques.

Some of the techniques that Vmware uses to optimize usage of RAM: Hypervisor memory swapping, Memory Sharing, Memory Compression and Host Memory Swap.

1. Hypervisor memory swapping into hard disk: If there is a dramatic spike in memory usage for a set of applications and there is a shortage of memory, a swap will occur. A portion of memory space will be allocated from a hard disk. Of course this is a highly risky operation as the performance might be impeded. This is the operation of the last resort in order to continue running application, albeit it might be slower.

2. MEMORY SHARING: Another memory optimization technique is memory sharing across virtual machines. If multiple VMs have same type of OS and run similar application components, it is possible the VMS can contain common data in memory. In this case it would be possible to share the common meory between the VMs. Memory savings from 10 t0 30 % has been observed.

3. MEMORY COMPRESSION: If the virtual machine’s memory usage approaches the level at which host-level swapping can be required, memory compression would be used. This would further reduce memory requirements .

4. Host Swap: If memory compression doesn’t keep the virtual machine’s memory usage low enough, hypervisor could forcibly reclaim memory using host-level swapping to a host cache configured on SSD. The host swap cache, being on SSD, will be much faster than the hard disk storage swap files, reducing access latency significantly.

GMO memory management practice.

At GMO memory is provisioned to satisfy most of the applications requirements. In practice we provide the thickest density in development clusters as opposed to production where memory is rarely over-provisioned. And as a result we do not need to use memory reclamation techniques as VMs are operating within their configured memory allocation. As a general rule, at any given time there is a mixture of active and passive VMs; allowing good efficiency across the environment.

Although we do not observe dramatic increase in memory demands, if memory spikes occur, memory reclamation techniques would kick in. In the last several years, not a single need for hypervisor memory swap has been observed. (And host swapping has not been implemented as it deemed unnecessary at this time).

For further reading on virtual memory: http://en.wikipedia.org/wiki/Virtual_memory

Appendix 2. Distributed Power Management

Distributed Power Management (DPM)

The focus on this feature, DPM, is to optimize power consumption at the cluster and physical server level. DPM compares cluster and server capacity to virtual machine current and historic power demands. In case of increased power demand, DPM would power additional hardware servers to be available. Similar to DRS, DPM provides a set of automated features based on administrator goals. Power savings between 5 and 20 % has been observed. The higher levels of savings were associated with lower virtual machines loads. There are no significant power savings above 30 % loads.

1