Comparing Live Migration Between Linux Containers and Kernel Virtual Machine
Total Page:16
File Type:pdf, Size:1020Kb
Master of Science in Computer Science February 2017 Comparing Live Migration between Linux Containers and Kernel Virtual Machine Investigation study in terms of parameters Kotikalapudi Sai Venkat Naresh Faculty of Computing Blekinge Institute of Technology SE-371 79 Karlskrona Sweden This thesis is submitted to the Faculty of Computing at Blekinge Institute of Technology in partial fulfillment of the requirements for the degree of Master of Science in Computer Science. The thesis is equivalent to 20 weeks of full time studies. Contact Information: Author(s): Sai Venkat Naresh Kotikalapudi E-mail: [email protected] University advisor: Sogand Shirinbab Department of Computer Science Faculty of Computing Internet : www.bth.se Blekinge Institute of Technology Phone : +46 455 38 50 00 SE-371 79 Karlskrona, Sweden Fax : +46 455 38 50 57 i i ABSTRACT Context. Virtualization technologies have been extensively used in various cloud platforms. Hardware replacements and maintenance are occasionally required, which leads to business downtime. Live migration is performed to ensure high availability of services, as it is a major aspect. The performance of live migration in virtualization technologies directly impacts the performance of cloud platforms. Hence comparison is performed in two mainstream virtualization technologies, container and hypervisor based virtualization. Objectives. In the present study, the objective is to perform live migration of hypervisor and container based virtualization technologies, Kernel Virtual Machine (KVM) and Linux Containers (LXC) respectively. Measure and compare the downtime, total migration time, CPU utilization and disk utilization of KVM and LXC during live migration. Methods. An initial literature is conducted to get in-depth knowledge about live migration in virtualization technologies. An experiment is conducted to perform live migration in KVM and LXC. The live migration process is performed when 100 % and 66% workloads are being generated to Cassandra present in virtual machine and container. The performance of live migration in KVM and LXC is measured in terms of CPU utilization, disk utilization, total migration time and downtime. Results. Based on the obtained results from the experiment, graphs are plotted for the performance of KVM and LXC during live migration. The results indicated that KVM has better CPU utilization when compared to LXC. However, downtime, total migration time and disk utilization of LXC are relatively better than KVM. From the obtained results, mean and standard deviation are calculated. Box plotting for downtime and total migration time is performed to illustrate difference between KVM and LXC. The measurable difference between KVM and LXC is calculated using Cohen’s d effect size for downtime, total migration time, CPU and disk utilization. Conclusions. The present study concludes that no single hypervisor has better performance when considering all performance metrics. While LXC has better performance when considering downtime, total migration time and disk utilization. However, KVM performs better when CPU usage is considered. Keywords: Virtualization, Live migration, hypervisor, container, KVM, LXC, i ACKNOWLEDGEMENTS I would like to sincerely thank my supervisor, Sogand Shirinbab for encouraging and guiding me in performing the thesis. My sincere thanks to the examiner Martin Boldt, for enlightening about guidelines to perform thesis. I would like to extend my gratitude to Bengt Olsson, System administrator of IT helpdesk for helping me out with server issues encountered during my thesis time. I would like to thank Prudhvi, Chaitanya, Apuroop, Avinash, Kashyap, Pavan, Sowrabh, Shiva , Srinivas and Akhil for the valuable memories from past 5 years. I would like to Pavan and Haritha for the incredible help and encouragement throughout my thesis time.I would like to also thank Srihas, Mohit, Raywon, Sharath Abbireddy and Rajeev for helping me study technically. ii CONTENTS ABSTRACT ...........................................................................................................................................I ACKNOWLEDGEMENTS ................................................................................................................ II LIST OF FIGURES ............................................................................................................................. V LIST OF TABLES .............................................................................................................................. VI LIST OF ABBREVIATIONS .......................................................................................................... VII 1 INTRODUCTION ....................................................................................................................... 8 PROBLEM IDENTIFICATION ..................................................................................................... 8 AIMS AND OBJECTIVES .......................................................................................................... 9 RESEARCH QUESTIONS .......................................................................................................... 9 THESIS OUTLINE .................................................................................................................. 10 2 BACKGROUND ........................................................................................................................ 11 VIRTUALIZATION ................................................................................................................. 11 2.1.1 Server virtualization ....................................................................................................... 11 2.1.2 Hypervisor ...................................................................................................................... 11 2.1.3 Container based Virtualization ....................................................................................... 12 MIGRATION .......................................................................................................................... 12 KVM ................................................................................................................................... 13 LINUX CONTAINERS ............................................................................................................. 14 2.4.1 LXD ................................................................................................................................. 15 2.4.2 Checkpoint /Restore in User Space (CRIU) .................................................................... 15 CASSANDRA ......................................................................................................................... 16 3 RELATED WORK .................................................................................................................... 17 4 METHODOLOGY .................................................................................................................... 18 LITERATURE REVIEW ........................................................................................................... 18 4.1.1 Selected Research Method .............................................................................................. 18 EXPERIMENT ........................................................................................................................ 18 4.2.2 Experiment setup ............................................................................................................ 19 4.2.3 Experiment Design .......................................................................................................... 20 4.2.4 Data Analysis .................................................................................................................. 22 5 RESULTS ................................................................................................................................... 24 LIVE MIGRATION IN KVM ................................................................................................... 24 5.1.1 Scenario 1 ....................................................................................................................... 24 5.1.2 Scenario 2 ....................................................................................................................... 25 LIVE MIGRATION IN LXC .................................................................................................... 26 5.2.1 Scenario 1 ....................................................................................................................... 26 5.2.2 Scenario 2 ....................................................................................................................... 27 6 ANALYSIS AND DISCUSSION .............................................................................................. 29 ANALYSIS ............................................................................................................................ 29 6.1.1 CPU Utilization .............................................................................................................. 29 6.1.2 Disk Utilization ............................................................................................................... 29 6.1.3 Downtime ........................................................................................................................ 30 6.1.4 Total Migration time ......................................................................................................