VMs, Unikernels and Containers: Experiences on the Performance of - - PowerPoint PPT Presentation
VMs, Unikernels and Containers: Experiences on the Performance of - - PowerPoint PPT Presentation
VMs, Unikernels and Containers: Experiences on the Performance of Virtualiza=on Technologies Felipe Huici, Filipe Manco, Jose Mendes, Simon Kuenzer NEC Europe Ltd. (Heidelberg) In the Beginning VM In the Beginning Tinyfied VMs
In the Beginning…
VM
In the Beginning…
VM
“Tinyfied VMs”
In the Beginning…
VM
“Tinyfied VMs” unikernels
In the Beginning…
VM
“Tinyfied VMs” unikernels containers
In the Beginning…
VM
“Tinyfied VMs” unikernels containers
- Virt. Technology Benchmarking
- Metrics:
– VM Image and memory consump=on – VM crea=on =me – Delay – Throughput
- Virt. Technology Benchmarking
- Metrics:
– VM Image and memory consump=on – VM crea=on =me – Delay – Throughput
higher
- verhead
lower
- verhead
- Virt. Technology Benchmarking
- Metrics:
– VM Image and memory consump=on – VM crea=on =me – Delay – Throughput
higher
- verhead
lower
- verhead
- Virt. Technology Benchmarking
- Metrics:
– VM Image and memory consump=on – VM crea=on =me – Delay – Throughput
higher
- verhead
lower
- verhead
- Virt. Technology Benchmarking
- Metrics:
– VM Image and memory consump=on – VM crea=on =me – Delay – Throughput
higher
- verhead
lower
- verhead
- Virt. Technology Benchmarking
- Metrics:
– VM Image and memory consump=on – VM crea=on =me – Delay – Throughput
higher
- verhead
lower
- verhead
- Virt. Technology Benchmarking
- Metrics:
– VM Image and memory consump=on – VM crea=on =me – Delay – Throughput
higher
- verhead
lower
- verhead
?
- Virt. Technology Benchmarking
- Metrics:
– VM Image and memory consump=on – VM crea=on =me – Delay – Throughput
higher
- verhead
lower
- verhead
- Virt. Technology Benchmarking
- Metrics:
– VM Image and memory consump=on – VM crea=on =me – Delay – Throughput
higher
- verhead
lower
- verhead
?
Virtualiza=on Technology Benchmarking
- Metrics:
– VM image and memory consump=on: ls, top, xl – VM crea=on =me: SYN flood + RST detec=on – Throughput: iperf, guest to host (TCP traffic) – RTT: ping flood
- VM-based tests run on both Xen and KVM
- Hardware: x86_64 server with an Intel Xeon E5-1630
v3 3.7GHz CPU (4 cores), 32GB RAM.
Virtualiza=on Technologies
- “Standard” VM
– Standard Debian-based Linux VM
- “Tinyfied” VM
– Tinyx, based on Linux kernel/busybox
- Unikernel
– On Xen: MiniOS + miniperf – On KVM: OSv + iperf
- Containers
– Docker
Virtualiza=on Technologies
- “Standard” VM
– Standard Debian-based Linux VM
- “Tinyfied” VM
– Tinyx, based on Linux kernel/busybox
- Unikernel
– On Xen: MiniOS + miniperf – On KVM: OSv + iperf
- Containers
– Docker
Standard VM: Applica=on on Top of Distro
Kernel Services Libraries User Applica5on 3rd Party Applica5ons
Most of the VM not Used…
Nginx
Kernel Services Libraries User Applica5on
memcached
bash 3rd Party Applica5ons libc libssl ssh init ext4 netfront blkfront
Tinyx: Keep Only What’s Needed
Nginx
Kernel Services Libraries User Applica5on
memcached
bash 3rd Party Applica5ons libc libssl ssh init ext4 netfront blkfront
Tinyx: Taylor-made Distro
Nginx
Kernel Services Libraries User Applica5on
memcached
bash 3rd Party Applica5ons libc libssl ssh init ext4 netfront blkfront
Tinyx: Taylor-made Distro
Nginx
Kernel Services Libraries User Applica5on
memcached
bash 3rd Party Applica5ons libc libssl ssh init ext4 netfront blkfront
Tinyx: Taylor-made Distro
Nginx
Kernel Services Libraries User Applica5on
memcached
bash 3rd Party Applica5ons libc libssl ssh init ext4 netfront blkfront
Tinyx: Taylor-made Distro
Nginx
Kernel Services Libraries User Applica5on
memcached
bash 3rd Party Applica5ons libc libssl ssh init ext4 netfront blkfront
Tinyx: Taylor-made Distro
▌ Keep only the necessary bits and pieces
l Specialized kernel build containing only the necessary modules l Root filesystem populated with
- nly necessary
services, libraries and 3rd party applications
Nginx
Kernel Services Libraries User Applica5on
memcached
bash 3rd Party Applica5ons libc libssl ssh init ext4 netfront blkfront
Virtualiza=on Technologies
- “Standard” VM
– Standard Debian-based Linux VM
- “Tinyfied” VM
– Tinyx, based on Linux kernel/busybox
- Unikernel
– On Xen: MiniOS + miniperf – On KVM: OSv + iperf
- Containers
– Docker
Virtualiza=on Technologies
- “Standard” VM
– Standard Debian-based Linux VM
- “Tinyfied” VM
– Tinyx, based on Linux kernel/busybox
- Unikernel
– On Xen: MiniOS + miniperf – On KVM: OSv + iperf
- Containers
– Docker
What’s a Unikernel?
- Specialized VM: single
applica=on + minimalis=c OS
- Single address space,
co-opera=ve scheduler so low overheads
What’s a Unikernel?
- Specialized VM: single
applica=on + minimalis=c OS
- Single address space,
co-opera=ve scheduler so low overheads
driver1 driver2
app 1
GENERAL-PURPOSE OPERATING SYSTEM (e.g., Linux, FreeBSD) KERNEL SPACE USER SPACE
app 2 app N
driverN
What’s a Unikernel?
- Specialized VM: single
applica=on + minimalis=c OS
- Single address space,
co-opera=ve scheduler so low overheads
driver1 driver2
app 1
GENERAL-PURPOSE OPERATING SYSTEM (e.g., Linux, FreeBSD) KERNEL SPACE USER SPACE
app 2 app N
driverN Vdriver1
vdriver2
app
MINIMALISTIC OPERATING SYSTEM (e.g., MiniOS, OSv) SINGLE ADDRESS SPACE
Unikernels for Benchmarking
Xen apps
guest OS
On Xen
Unikernels for Benchmarking
Xen apps
guest OS
Xen iperf
mini OS
On Xen
Unikernels for Benchmarking
Xen apps
guest OS
Xen iperf
mini OS
On Xen
KVM apps
guest OS
On KVM
Unikernels for Benchmarking
Xen apps
guest OS
Xen iperf
mini OS
On Xen
KVM iperf
OSv
KVM apps
guest OS
On KVM
Nota Bene…
- Our unikernel numbers include op=miza=ons
to the underlying virtualiza=on plamorms (Xen, KVM)
– Toolstacks – Back-end stores – Hotplug scripts – Network drivers (on Xen Tx)
- No =me to go over these…
RESULTS
Image Size, Memory Usage (log scale)
913 913 61 12 3.7 3.5 2 112 82 3.8 52 31 30 8 1 10 100 1000 MB img size mem usage
Boot Times (log scale)
6500 2988 1711 1081 431 330 31 1 10 100 1000 10000 Boot Time (ms)
RTT
34 19 18 15 9 5 4 5 10 15 20 25 30 35 40 RTT (ms)
Throughput
10 20 30 40 50 60 Throughput (Gb/s) Tx Rx
Conclusions
- Common lore: VMs provide good isola=on but
are heavyweight
– Results with standard VMs confirm this
- Containers provide lighter-weight
virtualiza=on
– But =nyfied VMs and especially unikernels yield comparable performance
Conclusions
- Common lore: VMs provide good isola=on but
are heavyweight
– Results with standard VMs confirm this
- Containers provide lighter-weight
virtualiza=on
– But =nyfied VMs and especially unikernels yield comparable performance
Poten5al Contribu5ons to draT-natarajan-nfvrg-containers-for-nfv-01
2.1.1 Challenges
- VNF provisioning =me
- Run=me performance (throughput, scaling up/down)
- 3. Benefits of Containers
- Service agility vs VMs
- Containers have beoer run=me performance
- Auto-scaling of VNFs
- Cross-VNF compa=bility: container unikernel/minimalis=c distro
- Overall performance: VMs -25% throughput vs containers
- 5. Conclusion
- Containers have significant advantages vs hypervisor-based solu=ons