osv – the os designed for the cloud

1

Upload: yandex

Post on 06-May-2015

4.799 views

Category:

Technology


3 download

DESCRIPTION

A lot of the cloud discussion centers around which hypervisors are the best, and which management tools will simplify one's life the most. But is it the whole story? While addressing the problems from the lower and higher layers, the middle man -- the guest operating system -- is usually left behind. This talk will introduce OSv — a new from-scratch operating system written by a group of former Linux veterans designed specifically for cloud deployments. We will showcase the operating system architecture and explain the performance and manageability improvements that can be expected

TRANSCRIPT

Page 1: OSv – The OS designed for the Cloud

OSvDesigned for the cloud

Lord Glauber Costa of [email protected]

Cloudius Systems

Page 2: OSv – The OS designed for the Cloud

About myself

● Some contributions to Xen● Extensive contributions to Linux and QEMU● Early employee at Cloudius (#4), OSv● после моего выступления, помочь мне

практиковать (медленно пожалуйста)

Page 3: OSv – The OS designed for the Cloud

About Sealand

● Mightiest country on Earth● 0.025 m² area size● Fought and won a war (15 min) against UK● De facto recognition by Germany and UK

Page 4: OSv – The OS designed for the Cloud

About Cloudius

● Founded in December 2012● ~15 people● 9 countries● Open source experience● Linux Foundation member

Page 5: OSv – The OS designed for the Cloud

About OSv

Page 6: OSv – The OS designed for the Cloud

OSv

● “Cloud OS” written from scratch● C++11● BSD licensed● Networking stack and ZFS imported from

FreeBSD○ We are modifying the networking stack○ Switching to OpenZFS in the future

Page 7: OSv – The OS designed for the Cloud

Typical Cloud Stack

Application

Application Server

JVM

Operating System

Hypervisor

Hardware

Protection and

abstraction

Page 8: OSv – The OS designed for the Cloud

● Single application per VM● No kernel and userspace separation● No fork()● MMU access via OSv APIs● POSIX APIs for compatibility

“Library OS”

Page 9: OSv – The OS designed for the Cloud

“Library OS”

Application

Application Server

JVM + OSv

Hypervisor

Hardware

Page 10: OSv – The OS designed for the Cloud

Features

Page 11: OSv – The OS designed for the Cloud

OS Services

● Scheduler● Memory management

○ mmap○ demand paging

● Networking● File system

○ ZFS and ramfs

Page 12: OSv – The OS designed for the Cloud

● Linux system calls○ uname() reports Linux for compatibility

● libc● OSv APIs

APIs

Page 13: OSv – The OS designed for the Cloud

● Pure 64-bit OS● 64-bit x86

○ KVM○ Xen HVM○ Xen PV - incomplete○ VMware and VirtualBox - in progress

● 64-bit ARM - started!● Others - help wanted!

Architectures

Page 14: OSv – The OS designed for the Cloud

Status

● JVM languages○ Java, JRuby, Scala, Groovy, Clojure, JavaScript

● JVM applications○ Cassandra○ Tomcat

● Other runtimes○ mruby○ I would love to see someone port Node.js...

● Native applications○ memcached○ haproxy

Page 15: OSv – The OS designed for the Cloud

Performance

Page 16: OSv – The OS designed for the Cloud

Performance

● Outperforms Linux○ SpecJVM, memcached, netperf

● Same as Linux○ Tomcat○ Cassandra

● < 1 second boot time● 4x faster context switch in scheduler

microbenchmarks than Linux

Page 17: OSv – The OS designed for the Cloud

Image Size

● 17 MB minimal image○ kernel + libc

● 29 MB mruby image○ kernel + libc + mruby

● 465 MB default image (!)○ kernel + libc + openjdk○ openjdk is 127 MB○ ZFS intent log related, working on a fix

Page 18: OSv – The OS designed for the Cloud

How is OSv different?

Page 19: OSv – The OS designed for the Cloud

● Linux network channels by Van Jacobson○ Proposed in 2006, never merged○ Packet processing overhead reduced by 25% for 1

CPU and 20% for 2 CPUs (source: lwn.net)● Network channels in OSv

○ Channel connected to the application● Netperf throughput increases 30% from ~36

Gbps to ~47 Gbps○ Linux on host, OSv in guest

Network channels

Page 20: OSv – The OS designed for the Cloud

JVM Balloon

● GC heap autotuning● Steal memory from JVM on OS memory

pressure● Running on unmodified JVM

○ Compacting GC causes interesting problems● Nice presentation at our youtube channel

Page 21: OSv – The OS designed for the Cloud

● Replace GC card tables with MMU remapping

● Modified OpenJDK● Azul C4’s GC uses similar MMU tricks on

x86○ Out-of-tree Linux patches

JVM and MMU

Page 22: OSv – The OS designed for the Cloud

Admin

Page 23: OSv – The OS designed for the Cloud

OS Admin

Traditional OS● Built for a standalone desktop● CLI oriented● Human oriented● File base configuration● Hard to automate

Cloud OS● Built for mass deployment● API oriented● Machine oriented● API base configuration● Easy to automate

Page 24: OSv – The OS designed for the Cloud

Alpha Release3/2014

Optimized ZFS cacheDirty page writebackJVM page tableHV support:GCE, VMW, VBox

Git init osv, 12/2012

Java hello world, 01/2013

support for64 vcpu 02/2013

UDP, 03/2013

ZFS support> 1Gbps netperf, 6/2013

Cassandra outperforms Linux, 8/2013

Native REST APIMemcached gain > 70%1/2014

Cli and web interface9/2014

Tomcat,HAProxy modules10/2013

Net channelsJVM ballooning >47Gbps netperf 2/2014

Image RepositoryJVM Read barrier eliminationDPDK supportMore ...

Roadmap

Page 25: OSv – The OS designed for the Cloud

So what about containers?

Page 26: OSv – The OS designed for the Cloud

Containers

● Docker is awesome○ Linux control groups not so awesome...

● Fast boot● Fast provisioning● Performance

Page 27: OSv – The OS designed for the Cloud

Containers under the hood

● Shared kernel image○ Kernel upgrades○ Hardware maintenance

● Complexity in the kernel● Copy-on-write userspace

Page 28: OSv – The OS designed for the Cloud

OSv - best of both worlds?

● Fast boot, fast provisioning, performance● Virtualized

○ Saner abstraction layer○ Stronger Isolation○ Heterogeneous datacenter○ MMU access, and other hardware primitives

● Great blog post on Google+ “OSv vs containers”

Page 29: OSv – The OS designed for the Cloud

That’s it!

Page 30: OSv – The OS designed for the Cloud

Thank you!

● Web○ http://osv.io

● Github○ http://github.com/cloudius-systems/osv

● Mailing List○ [email protected]

● You should follow us on Twitter:○ @CloudiusSystems