Thursday 12 June 2014

Virtualization and its effect on High Performance Computing

Documentation on Virtualization and its effect on High Performance Computing

View   
Today is an era of High-Performance computing where business needs have increased and so have increased the demands for resources but in any general case if we opt we will come to see that the hardware resources are very much limited and we have to accommodate our every possible needs within it. So here is a small view of what I came to know going through few research papers, amongst which one describes the limitation of cloud when coming to the point “High Performance Computing”.

Abstract
Despite cloud computing’s tremendous benefits in the fields of applications like enterprise, Web, game and multimedia. Its success in the field of high performance computing has been very limited. The most obvious reason cited for it is “Virtualization” which is a technique to run multiple instances of operating system or server side services at a go. Meanwhile the rising need of virtualization has compelled CPU vendors to modify the chips with virtualization. The concept of virtualization at hardware level helped reducing the gap between high performance computing with virtualization. This helped in accelerating context switching, speeding up address translation and enable I/O direct access which can basically cause overhead of resources.
            Research works indicate that hardware assisted virtualization can bring high performance computing as a service into realization.

Limitations of virtualization on HPC level and its solutions
So why are these limitations perceptual to virtualization when we talk in terms of high performance computing?????
            The answer to this question is very simple. High Performance Computing utilises the concept of parallel processing which requires distributed system to achieve parallel processing and apparently research work has shown virtualization to be a root cause to the detrimental performance of high performance computing since it was causing overhead on the CPU and I/O. So, in the field of HPC, the cloud technology was not been able to provide proper functioning as compared to high performance utilisation of resources.
            So cloud service providers have been trying to mitigate this performance gap. For example Amazon Web Services (AWS) has launched “EC2 Cluster Compute Instances” which did some promising work on this problem keeping in mind that HPC applications may still reap the benefits from cloud computing and virtualization.
            Further development to the concept of integrating virtualization with chips was first propelled by Intel which released VT-i (for Itanium), VT-x and VT-d whereas AMD released AMD-V and AMD-Vi. The VT-i, VT-x and AMD-V extensions were used to accelerate context switching between VMM (Virtual Machine Monitor) and guest Virtual Machines. These virtual machines also helped in adding hardware page tables to the Memory Management Unit (MMU) to speed up page table mappings from guest virtual machines to physical machines.

Evaluating two cases of Virtual Machine
            In this discussion I have emphasized o discussing about two instances of virtual machine that is KVM (Kernel Virtual Machine) and XEN. Both their workings and architectural approaches of virtualization are different. The reasons for comparing these two instances are
1) Both of them support Full Virtualization where there is no need for modification of the guest operating system.
2) These two instances are open source virtualization tools which are widely supported by any LINUX distributions.

XEN architecture   
XEN is basically a hypervisor that is running in the most privileged CPU state than any other software running on the physical machine. This hypervisor is responsible for memory management, CPU scheduling etc. In XEN architecture there is a host operating system which interacts with the system on behalf of the guest operating system. The host operating system is referred as “dom0” and the guest operating systems are referred as “domU”. The dom0 domain is launched when the physical machine starts and is a modified operating system. The dom0 domain controls the hypervisor and manages it to launch the unprivileged guest operating system or domU operating system. In case of paravirtualization approach the OS on the domU is slightly modified. The domU paravirtualized operating system can access the hardware devices by the help of paravirtualized drivers through the dom0.

KVM architecture
            Kernel based virtual machine (KVM) is a virtualization technique which comes integrated with the LINUX kernel. It was first developed by Qumranet. Instead of creating a separate hypervisor the LINUX kernel was used as a hypervisor itself. The KVM depends on the hypervisor for virtualization. It comprises of a loadable kernel module kvm.ko providing the core virtualization infrastructure which is loaded by the physical machine at start up.
In this virtualization model virtual machines are created by using a device node (/dev/kvm). Every guest VM in this virtualization is just another regular process scheduled by the regular LINUX scheduler. Besides two modes of execution kernel and user there is another mode that KVM adds which is the guest mode (which has its own kernel and user modes that the hypervisor is unconcerned with)
Since a VM in Kernel Virtual Machine is simply a process, the standard LINUX process management tools can be used. One can destroy, pause and resume a VM with the kill command and view resource usage with the top command. The VM belongs to the user who started it and all accesses to it are verified by the kernel. Hence system administrators can easily manage VMs with the existing tools provided with the LINUX itself.

Disk Performance status of KVM and XEN (On the basis of I Ozone version 3-398 as the microbench mark tool for executing some file operations and measuring their performances)
Operations
In Physical Machine
In Virtual Machine with XEN
In Virtual Machine with KVM
CPU cache effect
Write operation
Yields a throughput of around 1.65 gb/sec
Yields a throughput just above 1.0 gb/s when the file size is below 32 mb and increases to above 1.75 gb/s afterwards.
Yields a throughput of 1.2 gb/s


---
Read operation
Throughput of 6.85 gb/s when the record size is 128 kb or less and it reduces to 6.25 gb/s when the record size increases
Throughput is 4.8 gb/s but it increases to 6.4 gb/s when the file size is above 128 mb
Throughput reaches 4.8 gb/s when the record size is 64 kb or less and then decreases to 3.9 gb/s
Throughput goes beyond 9.2 gb/s when the file size is below 4 mb ad the record size is less than 128 kb