46
OS V Avi Kivity, Don Marti Cloudius Systems @CloudiusSystems

OSv presentation from Linux Foundation Collaboration Summit

Embed Size (px)

DESCRIPTION

OSv is a lightweight operating system designed to improve performance and administration for applications deployed in the cloud. Learn about the speed and manageability wins from a brand-new OS that works on your private or public cloud.

Citation preview

Page 1: OSv presentation from Linux Foundation Collaboration Summit

OSV

Avi Kivity, Don MartiCloudius Systems

@CloudiusSystems

Page 2: OSv presentation from Linux Foundation Collaboration Summit

Typical Cloud Stack

Hardware

Hypervisor

OS

JVM

App Server

Your App

OS

JVM

App Server

Your App

OS

JVM

App Server

Your App

Page 3: OSv presentation from Linux Foundation Collaboration Summit

Our software stackcongealed into existence.

Page 4: OSv presentation from Linux Foundation Collaboration Summit

Too Many Layers, Too Little Value

Property/Component

Hardware abstraction

Isolation

Resource virtualization

Backward compatibility

Security

Memory management

I/O stack

Configuration

VMM OS runtime

Duplicatio

n

Page 5: OSv presentation from Linux Foundation Collaboration Summit
Page 6: OSv presentation from Linux Foundation Collaboration Summit

Transformed the enterprise from physical2virtual

Virtualization

Virtualization 1.0 Virtualization 2.0

Compute node

virtual server

Virtualization 2.0, Massive Scale

Scalability

Page 7: OSv presentation from Linux Foundation Collaboration Summit

Virtualization 2.0

vServer OS 1.0Architecture

● No Hardware● No Users● One app/guest

● Yes Complexity

Page 8: OSv presentation from Linux Foundation Collaboration Summit
Page 9: OSv presentation from Linux Foundation Collaboration Summit

The new Cloud Stack - OSv

Hardware

Hypervisor

Core

App Server

Your App

Single Process

Kernel space only

Linked to existing JVMs

App sees no change

Core

Your App

Page 10: OSv presentation from Linux Foundation Collaboration Summit

The new Cloud Stack - OSv

Memory Huge pages, Heap vs Sys

I/O Zero copy, full aio, batching

Scheduling Lock free, low latency

Tuning Out of the box, auto

CPU Low cost ctx, Direct signals,..

Page 11: OSv presentation from Linux Foundation Collaboration Summit

Alpha Release3/2014

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

Milestones

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/2013

Tomcat,HAProxy modules10/2013

Net channelsJVM ballooning>47Gbps netperf 2/2014

Image RepositoryJVM Read barrier eliminationDPDK supportMore ...

Page 12: OSv presentation from Linux Foundation Collaboration Summit

Memcached benchmark

Requests/s (higher is better)

Page 13: OSv presentation from Linux Foundation Collaboration Summit

Integrating the JVM into the kernel

Core

JVM

Application Server

Your AppDynamicHeap Memory

TCP in theJVM + Appcontext Fast inter

thread wakeup

Page 14: OSv presentation from Linux Foundation Collaboration Summit

JVM Garbage Collection and the kernel

Application thread (“mutator”)

Garbage collection thread

JVM Object

JVM Object

ref

Page 15: OSv presentation from Linux Foundation Collaboration Summit

JVM Garbage Collection

Application thread (“mutator”)

Garbage collection thread

JVM Object

JVM Object

JVM Objectref

change

Page 16: OSv presentation from Linux Foundation Collaboration Summit

JVM Garbage Collection

Application thread (“mutator”)

Garbage collection thread

JVM Object

JVM Object

JVM Objectref

scan

change

Page 17: OSv presentation from Linux Foundation Collaboration Summit

JVM Garbage Collection

Application thread (“mutator”)

Garbage collection thread

JVM Object

JVM Object

JVM Objectref

scan

write

change

card table

read

Page 18: OSv presentation from Linux Foundation Collaboration Summit

JVM Garbage Collection

Application thread (“mutator”)

Garbage collection thread

JVM Object

JVM Object

JVM Objectref

scan

change

page table

read

hardware update

Page 19: OSv presentation from Linux Foundation Collaboration Summit

Van Jacobson == TCP/IP

Common kernel network stack

Leads to servo-loop:

Page 20: OSv presentation from Linux Foundation Collaboration Summit

Van Jacobson == TCP/IP

Net Channel design:

Page 21: OSv presentation from Linux Foundation Collaboration Summit

Dynamic heap, sharing is good

JVM Memory System memory

Lend memory

Page 22: OSv presentation from Linux Foundation Collaboration Summit

OS that doesn’t get in the way

4 VMs per sys admin ratio

http://www.computerworld.com.au/article/352635/there_best_practice_server_system_administrator_ratio_/

NO TuningNO StateNO Patching

Page 23: OSv presentation from Linux Foundation Collaboration Summit

Virtualization 2.0: Stateless servers

Page 24: OSv presentation from Linux Foundation Collaboration Summit

REST API definition use Swagger

REST api for *any* action

Page 25: OSv presentation from Linux Foundation Collaboration Summit

Performance and tracing

Page 26: OSv presentation from Linux Foundation Collaboration Summit

Porting a JVM application to OSV

1. Done*

* well, unless the application fork()s

Page 27: OSv presentation from Linux Foundation Collaboration Summit

Porting a C application to OSV

1. Must be a single-process application2. May not fork() or exec()3. Rebuild as a shared object (.so)4. Other API limitations apply*

* Post to the list, and missing items are usually added quickly.

Page 28: OSv presentation from Linux Foundation Collaboration Summit

● JVM-based application○ No effort

● Traditional C/C++ application○ More effort

● Virtio-app○ NFV - highest gain

Different customization levels

Page 29: OSv presentation from Linux Foundation Collaboration Summit

● First OS to be written in C++11● Interrupt handler using lambda function:

_msi.easy_register({ { 0, [&] { _rxq.vqueue->disable_interrupts(); }, poll_task}, { 1, [&] { _txq.vqueue->disable_interrupts(); }, nullptr }

});

OSv == Cool

Page 30: OSv presentation from Linux Foundation Collaboration Summit

So what about containers?

Page 31: OSv presentation from Linux Foundation Collaboration Summit

Capstan demo

Page 32: OSv presentation from Linux Foundation Collaboration Summit

● Docker is awesome! Low overhead!○ Small artifacts○ Fast deployment○ Fast startup (container start, not OS boot)

● Docker is awesome! Easy builds!○ Simple configuration file○ Minimal additional work on top of application build

Docker is awesome

Page 33: OSv presentation from Linux Foundation Collaboration Summit

Containers under the hood

● Hypervisors are awesome too!○ Live migration (load balance, hardware maint)○ Multiple kernel versions available

● Running VMs everywhere is awesome!○ Public cloud, private cloud, existing hypervisor...

● Security is awesome!○ Container attack surface is full kernel interface.○ Hypervisor attack surface is small.

● Sometimes a hypervisor is already there (private and public clouds)

Hypervisors are awesome

Page 34: OSv presentation from Linux Foundation Collaboration Summit

Everything is awesome

What if we could have advantages of Docker without limitations of containers?

● Fast boot, fast provisioning● High performance● Tiny footprint● Virtualized

○ Live migration○ Elasticity○ MMU access

Page 35: OSv presentation from Linux Foundation Collaboration Summit

Capstan

● Check out a base image● Build application● Create complete run-anywhere VM

○ No Capstan needed in production● 12-20MB and 3 seconds of overhead

● All driven by one simple config file● Low overhead of containers with

deployment flexibility of a VM image.

Page 36: OSv presentation from Linux Foundation Collaboration Summit

Let’s Collaborate

Page 37: OSv presentation from Linux Foundation Collaboration Summit

http://osv.io

https://github.com/cloudius-systems/osv

@CloudiusSystems

[email protected]

OSv@Cloudius

Page 38: OSv presentation from Linux Foundation Collaboration Summit

Backup slides

Page 39: OSv presentation from Linux Foundation Collaboration Summit

Virtualization 2.0, Dev/Ops

Page 40: OSv presentation from Linux Foundation Collaboration Summit

Virtualization 2.0, agility!

Rolling upgrade within seconds and a fall back option

Page 41: OSv presentation from Linux Foundation Collaboration Summit

Cloudius Systems, OS ComparisonFeature/Property

Good for:

Typical workload

kernel vs app

API, compatibility

# Config files

Tuning

Upgrade/state

OSv

Machete: Cloud/VirtualizationSingle app * VMs

Cooperation

JVM, POSIX

0

Auto

Stateless, just boots

JVM support

Lines of code

License

Tailored GC/STW solution Fewer

BSD

Traditional OSSwiss knife: anything

goesMultiple apps/users,

utilities, anything

distrust

Any, but versions/releases..

1000

Manual, requires certifications

Complex, needs snapshots, hope..

Yet another app

Gazillion

GPL / proprietary

Page 42: OSv presentation from Linux Foundation Collaboration Summit

Be the best OSpowering virtual machines

in the cloud

Mission statement

Hardware

Hypervisor

OSv

Your App

Hardware

Hypervisor

OSv + Jazz JVM

Your App

Hardware

Hypervisor

OSv + Jazz JVM

Hardware

Hypervisor

OSv

Hardware

Hypervisor

OSv + Jazz JVM

Your App

Page 43: OSv presentation from Linux Foundation Collaboration Summit

Application upload

Page 44: OSv presentation from Linux Foundation Collaboration Summit

● Going idle is much more expensive on virtual machines

● So are inter-processor interrupts - IPIs● Combine the two:

○ Before going idle, announce it via shared memory○ Delay going idle○ In the meanwhile, poll for wakeup requests from

other processors● Result: wakeups are faster, both for the

processor waking, and for the wakee

Idle-time polling

Page 45: OSv presentation from Linux Foundation Collaboration Summit

OSv applicable for

Virtualization

Application server

Virtual appliance

PaaS

Cloud Vendors

Page 46: OSv presentation from Linux Foundation Collaboration Summit

Plan

1. Open Source Launch - Done

2. Harden Virtual Appliances - Doing3. Q4 2014 GA by Cloud vendors - Doing

4. OEM (cloud/appliance), Enterprise