performance comparison between linux containers and virtual machines
TRANSCRIPT
Performance Comparison Between Linux Containers and Virtual
Machines
Venue: 2015 International Conference on Advances in Computer Engineering
and Applications
Agenda
• What is virtualization?
• Virtualization technologies
• Comparing the technologies
• Conclusion
What is virtualization?
• virtual machine (VM) is an emulation of a particular computer system.
• VM is a common way to run different services in the cloud.
• Main benefits of virtualizations are:– Portable deployment (fast application delivery)– Scale and deploy with ease– Hardware independence– Isolation– Secure user environment– ….
Virtualization technologies
• Hypervisor-based virtualization
– Kernel-based VM (KVM), VMWare
• Container-based virtualization
– Docker, LXC
• Hybrid virtualization
– ZeroVM, OSv
Hypervisor-based virtualization
• Operates at the hardware level• Isolates VM from the underlying host system.• Benefits
– Abstracts hardware – Support running VMs independently and
isolated from the hardware (windows VM can run on Linux host)
Problems• A full OS runs on the VM=>
emulation of VM has huge overhead.(big images and long start-up time)
Container-based virtualization• Implemented in Linux kernel via
– control groups(resource management) – namespaces(restricted access to resources)
• Benefits – A light weight alternative to hypervisor-based– implement isolation of processes at the OS level– Disk images are smaller– A higher density of virtualized instances
Problems• Window container cannot run on a Linux host• Resource isolation is not as accurate as
hypervisors (issues for multi-tenant security)
Comparing the technologies-performance comparison
• In this paper, Docker is used for running containers.
• The set up: – Two physical servers (OS: Ubuntu14.04, RAM: 2GB) for hosting
docker and VM.
– front-end= application server hosting Joomla
– Back-end= database server hosting Postgres
– Jmeter is used for stress testing Joomla by sending simultaneous requests to Joomla.
Comparing the technologies-Scalability comparison
• For container scalability test, use Kebernetes cluster manager to scale the the Docker host on the 2 physical servers.
• For VM scalability test, The application is deployed in an AWS EC2 with auto scaling enabled.
• The set up: – AWS EC2 for cloud and a physical server to host docker.
– Application = a load balanced WordPress application
– Jmeter is used for stressing and trigger the scaling
Scalability comparison
The time to scale for deploying another container (~8 sec.) is much less than the time to scale for deploying another virtual machine (~3 mins).=> 22x times faster scalability