a performance benchmarking analysis of hypervisors, containers … · 2018-07-15 · rump kernel is...

30
[email protected] www.virtualopensystems.com A performance benchmarking analysis of Hypervisors, Containers and Unikernels on ARMv8 and x86 CPUs EuCNC 2018, Ljubljana, Slovenia June 18-21

Upload: others

Post on 02-Aug-2020

0 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: A performance benchmarking analysis of Hypervisors, Containers … · 2018-07-15 · Rump Kernel is derived by picking the desired components from the NetBSD anykernel Execute existing

[email protected]

A performance benchmarking analysis of Hypervisors, Containers and Unikernels on ARMv8 and x86 CPUs

EuCNC 2018, Ljubljana, Slovenia June 18-21

Page 2: A performance benchmarking analysis of Hypervisors, Containers … · 2018-07-15 · Rump Kernel is derived by picking the desired components from the NetBSD anykernel Execute existing

Virtual Open Systems Confidential & Proprietary 2

Authorship and sponsorship

Virtual Open Systems is a high-tech software company active in open source virtualization solutions and custom services for complex mixed-criticality automotive systems, NFV networking infrastructures, mobile devices and in general for embedded heterogeneous multicore systems around new generation processor architectures.

This work is done in the context of the H2020 “Next Generation Platform as a Service” project (www.ngpaas.eu).

Page 3: A performance benchmarking analysis of Hypervisors, Containers … · 2018-07-15 · Rump Kernel is derived by picking the desired components from the NetBSD anykernel Execute existing

Virtual Open Systems Confidential & Proprietary 3

Objectives Evaluated Solutions– Virtual Machines– Containers– Unikernels

Benchmark configuration Benchmark results Conclusion

Agenda

Page 4: A performance benchmarking analysis of Hypervisors, Containers … · 2018-07-15 · Rump Kernel is derived by picking the desired components from the NetBSD anykernel Execute existing

Virtual Open Systems Confidential & Proprietary 4

Objectives Evaluated Solutions– Virtual Machines– Containers– Unikernels

Benchmark configuration Benchmark results Conclusion

Agenda

Page 5: A performance benchmarking analysis of Hypervisors, Containers … · 2018-07-15 · Rump Kernel is derived by picking the desired components from the NetBSD anykernel Execute existing

Virtual Open Systems Confidential & Proprietary 5

Software Defined Network (SDN) and Network Function Virtualization (NFV) technologies are emerging in the Edge Computing

Efficient virtualization technologies are becoming crucialNew lightweight techniques (Containers, Unikernels) have

emerged

This work focuses on comparing the performance of open-source virtualization technologies on X86 and ARMv8

Objectives

Page 6: A performance benchmarking analysis of Hypervisors, Containers … · 2018-07-15 · Rump Kernel is derived by picking the desired components from the NetBSD anykernel Execute existing

Virtual Open Systems Confidential & Proprietary 6

Objectives Evaluated Solutions– Virtual Machines– Containers– Unikernels

Benchmark configuration Benchmark results Conclusion

Agenda

Page 7: A performance benchmarking analysis of Hypervisors, Containers … · 2018-07-15 · Rump Kernel is derived by picking the desired components from the NetBSD anykernel Execute existing

Virtual Open Systems Confidential & Proprietary 7

Virtualization is a technology that allows to create multiple environments or dedicated resources from a single, physical hardware system.

Virtual Machines (VMs)

Hardware

Hypervisor/Host OS

VM VMGuest OS

Bins/Libs

App App

Guest OS

Bins/Libs

App App Software called a hypervisor connects directly to that hardware and allows to split one system into separate environments called Virtual Machines (VMs)

Hypervisor solution benchmarked is KVMVM-based architecture

Page 8: A performance benchmarking analysis of Hypervisors, Containers … · 2018-07-15 · Rump Kernel is derived by picking the desired components from the NetBSD anykernel Execute existing

Virtual Open Systems Confidential & Proprietary 8

KVM is a full virtualization solution

It makes Linux Kernel act as a Type-1 hypervisor

KVM relies on user space tools like Quick Emulator (QEMU)

QEMU is used to emulate and provide device abstractions

KVM also provides support for paravirtual devices through Virtio, for better performance

Kernel Virtual Machine (KVM)

Page 9: A performance benchmarking analysis of Hypervisors, Containers … · 2018-07-15 · Rump Kernel is derived by picking the desired components from the NetBSD anykernel Execute existing

Virtual Open Systems Confidential & Proprietary 9

Containers are a virtualization method for deploying and running distributed applications without launching an entire VM for each application.

Containers

They depend on sharing the same base OS among themselves

Loosely isolated

Container engines benchmarked are Docker and rkt.

Hardware

Host OS

Container Engine

Container

Bins/Libs

App App

Container

Bins/Libs

App

Container-based architecture

Page 10: A performance benchmarking analysis of Hypervisors, Containers … · 2018-07-15 · Rump Kernel is derived by picking the desired components from the NetBSD anykernel Execute existing

Virtual Open Systems Confidential & Proprietary 10

Most popularly used container engine

Easy deployment and management of cloud applications

Stable support for different for various architectures and different applications

Uses libcontainer to take advantages of Linux namespaces and cgroups

Docker

Page 11: A performance benchmarking analysis of Hypervisors, Containers … · 2018-07-15 · Rump Kernel is derived by picking the desired components from the NetBSD anykernel Execute existing

Virtual Open Systems Confidential & Proprietary 11

rkt (pronounce rocket) has a security-minded approach as its primary distinguishing feature from Docker

Has support for all ”Docker Images”

Has security features like:

– Fetching container images as a non-root user

– Option to use KVM or VM based isolation as stage 1

– Support for SVirt in addition to a default SELinux policy

CoreOS rkt

Page 12: A performance benchmarking analysis of Hypervisors, Containers … · 2018-07-15 · Rump Kernel is derived by picking the desired components from the NetBSD anykernel Execute existing

Virtual Open Systems Confidential & Proprietary 12

Unikernels are specialized, single-address-space machine images constructed using library operating systems.

Unikernels

Size of the traditional VMs is reduced

Also use an Hypervisor (such as KVM), there are actually also VMs!

Built by combining only the specialized application image and OS software parts required to support it

Unikernel solutions benchmarked are Rumprun and OSv

Hardware

Hypervisor/Host OSUnikernel Unikernel

Minimal Lib OS

App

Minimal Lib OS

App

Unikernel-based architecture

Page 13: A performance benchmarking analysis of Hypervisors, Containers … · 2018-07-15 · Rump Kernel is derived by picking the desired components from the NetBSD anykernel Execute existing

Virtual Open Systems Confidential & Proprietary 13

The Rumprun unikernel is based on the driver components of rump kernels

Rump Kernel is derived by picking the desired components from the NetBSD anykernel

Execute existing POSIX applications on KVM or Xen

Doesn’t support exec() and fork() system calls

Rumprun

Page 14: A performance benchmarking analysis of Hypervisors, Containers … · 2018-07-15 · Rump Kernel is derived by picking the desired components from the NetBSD anykernel Execute existing

Virtual Open Systems Confidential & Proprietary 14

OSv uses the concept of a library OS to provide a Lightweight OS

Application threads and the kernel share the same address space to reduce overhead

Only stable architecture supported is x86, so far

OSv

Page 15: A performance benchmarking analysis of Hypervisors, Containers … · 2018-07-15 · Rump Kernel is derived by picking the desired components from the NetBSD anykernel Execute existing

Virtual Open Systems Confidential & Proprietary 15

Objectives Evaluated Solutions– Virtual Machines– Containers– Unikernels

Benchmark configuration Benchmark results Conclusion

Agenda

Page 16: A performance benchmarking analysis of Hypervisors, Containers … · 2018-07-15 · Rump Kernel is derived by picking the desired components from the NetBSD anykernel Execute existing

Virtual Open Systems Confidential & Proprietary 16

CPU performance

– Benchmarked using SysBench

Memory bandwidth

– Benchmarked using STREAM

Network Bandwidth

– Benchmarked using Iperf

Benchmarking Tools

Page 17: A performance benchmarking analysis of Hypervisors, Containers … · 2018-07-15 · Rump Kernel is derived by picking the desired components from the NetBSD anykernel Execute existing

Virtual Open Systems Confidential & Proprietary 17

x86 64 bit platform

– Two Intel Xeon Processors E5-2623 v4

– 8 cores @2.60GHz

– Intel VT-x hardware virtualization extension

– 32GB of DDR4 RAM

Benchmarking Configuration

ARMv8 platform

– One Cavium ThunderX rev1 processor

– 48 cores @2GHz

– Hardware assisted virtualization extension

– 128GB of DDR4 RAM

Page 18: A performance benchmarking analysis of Hypervisors, Containers … · 2018-07-15 · Rump Kernel is derived by picking the desired components from the NetBSD anykernel Execute existing

Virtual Open Systems Confidential & Proprietary 18

Objectives Evaluated Solutions– Virtual Machines– Containers– Unikernels

Benchmark configuration Benchmark results Conclusion

Agenda

Page 19: A performance benchmarking analysis of Hypervisors, Containers … · 2018-07-15 · Rump Kernel is derived by picking the desired components from the NetBSD anykernel Execute existing

Virtual Open Systems Confidential & Proprietary 19

SysBench on an x86 server

CPU performance comparison

➢ Rumprun provides near native performance

➢ Containers have 0.45% overhead

➢ KVM has 0.7% overhead

➢ OSv has the worst performance with 1.6% overhead

Page 20: A performance benchmarking analysis of Hypervisors, Containers … · 2018-07-15 · Rump Kernel is derived by picking the desired components from the NetBSD anykernel Execute existing

Virtual Open Systems Confidential & Proprietary 20

SysBench on an ARMv8 server

CPU performance comparison

➢ KVM has a overhead of 0.8%

➢ Containers produce near-native performance

➢ Containers have very stable performance with negligible standard deviation

Page 21: A performance benchmarking analysis of Hypervisors, Containers … · 2018-07-15 · Rump Kernel is derived by picking the desired components from the NetBSD anykernel Execute existing

Virtual Open Systems Confidential & Proprietary 21

STREAM on an x86 server with 1 thread

Memory Bandwidth comparison

➢ Docker, rkt and Rumprun have negligible overhead

➢ OSv has a small overhead range of 0.6%-1.3%

➢ KVM has the maximum overhead range of 0.6%-1.6%

Page 22: A performance benchmarking analysis of Hypervisors, Containers … · 2018-07-15 · Rump Kernel is derived by picking the desired components from the NetBSD anykernel Execute existing

Virtual Open Systems Confidential & Proprietary 22

STREAM on an ARMv8 server with 1 thread

Memory Bandwidth comparison

➢ KVM has overhead of about 2% for Copy and about 3% for Scale operations

➢ Containers induce no overhead

Page 23: A performance benchmarking analysis of Hypervisors, Containers … · 2018-07-15 · Rump Kernel is derived by picking the desired components from the NetBSD anykernel Execute existing

Virtual Open Systems Confidential & Proprietary 23

STREAM on an ARMv8 server with 4 threads

Memory Bandwidth comparison

➢ KVM overhead scales to above 3% in all the cases

➢ Containers induce no overhead

Page 24: A performance benchmarking analysis of Hypervisors, Containers … · 2018-07-15 · Rump Kernel is derived by picking the desired components from the NetBSD anykernel Execute existing

Virtual Open Systems Confidential & Proprietary 24

STREAM on an ARMv8 server with 8 threads

Memory Bandwidth comparison

➢ KVM overhead slightly increases further to 4%

➢ Containers continue to produce near-native performance

Page 25: A performance benchmarking analysis of Hypervisors, Containers … · 2018-07-15 · Rump Kernel is derived by picking the desired components from the NetBSD anykernel Execute existing

Virtual Open Systems Confidential & Proprietary 25

Iperf on an x86 server

Network Bandwidth comparison

➢ Docker, rkt and OSv provide the highest performance

➢ KVM comparatively is 80% less efficient

➢ Rumprun has terrible performance issues with a max bandwidth of just 1.37 Gbps

Page 26: A performance benchmarking analysis of Hypervisors, Containers … · 2018-07-15 · Rump Kernel is derived by picking the desired components from the NetBSD anykernel Execute existing

Virtual Open Systems Confidential & Proprietary 26

Iperf on an ARMv8 server

Network Bandwidth comparison

➢ KVM performs better than both the container engines

➢ Docker comparatively has a performance overhead of almost 15.6%

➢ rkt shows an overhead of 7.2% compared to KVM

Page 27: A performance benchmarking analysis of Hypervisors, Containers … · 2018-07-15 · Rump Kernel is derived by picking the desired components from the NetBSD anykernel Execute existing

Virtual Open Systems Confidential & Proprietary 27

Objectives Evaluated Solutions– Virtual Machines– Containers– Unikernels

Benchmark configuration Benchmark results Conclusion

Agenda

Page 28: A performance benchmarking analysis of Hypervisors, Containers … · 2018-07-15 · Rump Kernel is derived by picking the desired components from the NetBSD anykernel Execute existing

Virtual Open Systems Confidential & Proprietary 28

Unikernels are still quite young and not production ready (no ARMv8 stable support), but are very promising

Containers are generally the fastest and the easiest to deploy

KVM VMs provide small CPU and memory overhead with a strong isolation

Conclusion

Page 29: A performance benchmarking analysis of Hypervisors, Containers … · 2018-07-15 · Rump Kernel is derived by picking the desired components from the NetBSD anykernel Execute existing

Virtual Open Systems Confidential & Proprietary 29

Extend to benchmarking other metrics like:

– Security

– Scalability

Benchmark Unikernels on ARMv8 once they are fully compatible and stable

Benchmark performance by launching containers inside VMs

Future Work

Page 30: A performance benchmarking analysis of Hypervisors, Containers … · 2018-07-15 · Rump Kernel is derived by picking the desired components from the NetBSD anykernel Execute existing

[email protected]

Web: virtualopensystems.com

THANK YOU!