An Abstract of the Thesis Of
Total Page:16
File Type:pdf, Size:1020Kb
AN ABSTRACT OF THE THESIS OF Pranjal Mittal for the degree of Master of Science in Computer Science presented on September 1, 2016. Title: Benchmarking Linux Containers and Virtual Machines Abstract approved: _________________________________________________ Carlos Jensen Rakesh BoBBa In data-centers, running multiple isolated workloads while getting the most performance out of availaBle hardware is key. For many years Virtual Machines (VMs) have Been an enaBler, But native containers which offer isolation similar to virtual machines while reducing overhead costs associated with emulating hardware resources have Become an increasingly attractive proposition for data- centers. This thesis aims at evaluating the CPU and Memory I/O performance of containers and VMs (specifically Docker and KVM) against Bare-metal for nodes/clusters with single or multiple deployed virtual entities. However, such a process of measuring the performance of each entity in a cluster consisting of several entities is an onerous task and error-prone due to lack of Benchmark synchronization, necessitating the development of a solution that allows automated Benchmarking. This leads to the second contriBution of this thesis which is to develop a new open source tool prototype (Playbench) that would enaBle repeataBle Benchmarking, allowing evaluating CPU and Memory I/O performance of each virtual entity (container or VM) in a cluster with multiple virtual entities deployed. ©Copyright By Pranjal Mittal September 1, 2016 All Rights Reserved Benchmarking Linux Containers and Virtual Machines by Pranjal Mittal A THESIS suBmitted to Oregon State University in partial fulfillment of the requirements for the degree of Master of Science Presented September 1, 2016 Commencement June 2017 Master of Science thesis of Pranjal Mittal presented on September 1, 2016 APPROVED: ________________________________________________________________ Co-Major Professor, representing Computer Science ________________________________________________________________ Co-Major Professor, representing Computer Science ________________________________________________________________ Director of the School of Electrical Engineering and Computer Science ________________________________________________________________ Dean of the Graduate School I understand that my thesis will Become part of the permanent collection of Oregon State University liBraries. My signature Below authorizes the release of my thesis to any reader upon request. ________________________________________________________________ Pranjal Mittal, Author ACKNOWLEDGEMENTS I would like to express my gratitude to my advisors Dr. Carlos Jensen and Dr. Rakesh BoBBa for their continuous time and support throughout this work and feedBack; Gorantla Sai Krishna, Dept. of Computer Science and Engineering, IIT (BHU), Varanasi for his contriButions while running of experiments and inputs on interpreting final results. I would also like to thank Intel Corporation for supporting this work in part, under Intel-OSU graduate fellowship program 2015-2016 and OSU Open Source LaB for the help with setting up an Intel Xeon server at the OSL data center. I am also thankful to D. Kevin McGrath for accepting the invitation and taking the time to Be a part of my Graduate committee. TABLE OF CONTENTS Page 1 Introduction ....................................................................................................... 1 1.1 Performance Characteristics: CPU and Memory I/O ............................... 2 1.2 Research Questions ................................................................................. 3 2 Related Work .................................................................................................... 5 3 Automation of Benchmarking ............................................................................ 8 3.1 AnsiBle and AnsiBle Playbooks .............................................................. 10 3.2 PlayBench: Container-VM Benchmark Automation Tool ....................... 11 4 Methodology ................................................................................................... 14 4.1 Starting/Stopping Virtual Machines or Containers ................................. 15 4.2 Networking ............................................................................................. 16 4.3 Steps for Benchmarking Virtual Machines/Containers ........................... 17 4.3.1 Single Entity: Massively Parallel Workload ...................................... 18 4.3.2 Multiple Entities: CPU and Memory I/O Performance ..................... 18 4.4 Other Methodology Notes ...................................................................... 19 5 Results .….. ..................................................................................................... 22 5.1 Single Virtual Entity Deployed: Massively Parallel Workload ................. 22 5.2 Multiple Virtual Entities Deployed: CPU Performance ........................... 25 5.3 Multiple Virtual Entities Deployed: Memory I/O ...................................... 32 6 Limitations and Future Work ........................................................................... 40 7 Conclusion . ..................................................................................................... 42 8 BiBliography ..................................................................................................... 43 Appendix ………………………………………………………………………...…… 47 LIST OF FIGURES Figure Page Figure 3.1 Inventory of multiple nodes, containers, VMs .................................... 13 Figure 4.1 Intel Xeon Server (2 NUMA Nodes) ................................................... 14 Figure 4.2 Virtual Units deployed on Host each running an equivalent workload 16 Figure 4.3 hosts file with container IDs and ansiBle_connection set to docker ... 17 Figure 4.4 Master playbook file for containers: site_containers.yml .................... 17 Figure 5.1 CPU Performance vs number of availaBle threads ............................ 23 Figure 5.2 % difference in performance relative to host (containers vs VMs) ..... 24 Figure 5.3 Single-core CPU Performance ........................................................... 26 Figure 5.4 Percentage difference relative to host (single-core performance) ..... 27 Figure 5.5 Multi-core CPU Performance ............................................................. 28 Figure 5.6 Percentage difference relative to host (multi-core CPU performance) ...................................................................................................................... 29 Figure 5.7 Single-core Integer Performance ....................................................... 30 Figure 5.8 Multi-core Integer Performance .......................................................... 30 Figure 5.9 Single-core Floating Performance ...................................................... 31 Figure 5.10 Multi-core Floating Performance ...................................................... 31 Figure 5.11 Single-core Memory Performance ................................................... 33 LIST OF FIGURES (Continued) Figure Page Figure 5.12 Difference relative to host (single-core memory performance) ........ 34 Figure 5.13 Multi-core Memory Performance ...................................................... 34 Figure 5.14 Percentage difference (multi-core memory performance) ................ 35 Figure 5.15 Memory: Copy (single-core performance) ........................................ 36 Figure 5.16 Memory: Copy (multi-core performance) ......................................... 36 Figure 5.17 Memory: Scale (single-core performance) ....................................... 37 Figure 5.18 Memory: Scale (multi-core performance) ......................................... 37 Figure 5.19 Memory: Add (single-core performance) .......................................... 38 Figure 5.20 Memory: Add (multi-core performance) ........................................... 38 Figure 5.21 Memory: Triad (single-core performance) ........................................ 39 Figure 5.22 Memory: Add (multi-core performance) ........................................... 39 1 Chapter 1: Introduction Performance unpredictaBility has Been listed among the top oBstacles to the growth of cloud computing [1]. With the adoption of container frameworks in cloud infrastructure and development environments, there has Been increased interest among developers and system administrators in understanding the runtime performance and security impact of running Linux containers [2] [3]. Until recently, the state of the art for deploying and managing multiple isolated workloads on a single machine was to use virtual machines. KVM (Kernel Virtual Machine) [4] is a popular example of a hypervisor used to provision Virtual Machines. It is a Linux kernel module that allows the kernel to function as a Type 1 hypervisor [5]. Container-Based virtualization makes use of the relatively new Linux kernel features called Namespaces and Cgroups [6] to estaBlish end-user isolation instead of running emulated hardware for each isolated entity and running an OS on top. This allows containers to offer isolation similar to virtual machines, without having to spend resources on emulating hardware and running multiple operating systems. This at least, in theory, makes them more efficient. Containers are Based on two key technologies; Cgroups and Namespaces. Cgroups allow for the creation of an isolated group of processes with restricted