OSv
Designed for the cloud
Lord Glauber Costa of Sealand
glommer@cloudius-systems.coom
Cloudius Systems
About myself
●
●
●
●

Some contributions to Xen
Extensive contributions to Linux and QEMU
Early employee at Cloudius (#4), OSv
после моего выступления, помочь мне
практиковать (медленно пожалуйста)
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
About Cloudius
●
●
●
●
●

Founded in December 2012
~15 people
9 countries
Open source experience
Linux Foundation member
About OSv
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
Typical Cloud Stack
Application
Application Server
JVM
Operating System
Hypervisor
Hardware

Protection
and
abstraction
“Library OS”
●
●
●
●
●

Single application per VM
No kernel and userspace separation
No fork()
MMU access via OSv APIs
POSIX APIs for compatibility
“Library OS”
Application
Application Server
JVM + OSv
Hypervisor
Hardware
Features
OS Services
● Scheduler
● Memory management
○ mmap
○ demand paging

● Networking
● File system
○ ZFS and ramfs
APIs
● Linux system calls
○ uname() reports Linux for compatibility

● libc
● OSv APIs
Architectures
● 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!
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
Performance
Performance
● Outperforms Linux
○ SpecJVM, memcached, netperf

● Same as Linux
○ Tomcat
○ Cassandra

● < 1 second boot time
● 4x faster context switch in scheduler
microbenchmarks than Linux
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
How is OSv different?
Network channels
● 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
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
JVM and MMU
● Replace GC card tables with MMU
remapping
● Modified OpenJDK
● Azul C4’s GC uses similar MMU tricks on
x86
○ Out-of-tree Linux patches
Admin
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
Roadmap
Alpha Release
3/2014

Git init
osv,
12/201
2

support
for
64 vcpu
02/2013

Java hello world,
01/2013

ZFS support
Cli and web
> 1Gbps netperf, interface
6/2013
9/2014

UDP,
03/2013

Cassandra
outperform
s Linux,
8/2013

Native REST API
Memcached gain
> 70%
1/2014

Tomcat,
HAProxy
modules
10/2013

Optimized ZFS
cache
Dirty page
writeback
JVM page table
HV support:
GCE, VMW, VBox

Net channels
JVM ballooning
>47Gbps
netperf
2/2014

Image Repository
JVM Read barrier
elimination
DPDK support
More ...
So what about
containers?
Containers
● Docker is awesome
○ Linux control groups not so awesome...

● Fast boot
● Fast provisioning
● Performance
Containers under the hood
● Shared kernel image
○ Kernel upgrades
○ Hardware maintenance

● Complexity in the kernel
● Copy-on-write userspace
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”
That’s it!
Thank you!
● Web
○ http://osv.io

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

● Mailing List
○ osv-dev@googlegroups.com

● You should follow us on Twitter:
○ @CloudiusSystems

OSv – The OS designed for the Cloud

  • 1.
    OSv Designed for thecloud Lord Glauber Costa of Sealand glommer@cloudius-systems.coom Cloudius Systems
  • 2.
    About myself ● ● ● ● Some contributionsto Xen Extensive contributions to Linux and QEMU Early employee at Cloudius (#4), OSv после моего выступления, помочь мне практиковать (медленно пожалуйста)
  • 3.
    About Sealand ● ● ● ● Mightiest countryon Earth 0.025 m² area size Fought and won a war (15 min) against UK De facto recognition by Germany and UK
  • 4.
    About Cloudius ● ● ● ● ● Founded inDecember 2012 ~15 people 9 countries Open source experience Linux Foundation member
  • 5.
  • 6.
    OSv ● ● ● ● “Cloud OS” writtenfrom scratch C++11 BSD licensed Networking stack and ZFS imported from FreeBSD ○ We are modifying the networking stack ○ Switching to OpenZFS in the future
  • 7.
    Typical Cloud Stack Application ApplicationServer JVM Operating System Hypervisor Hardware Protection and abstraction
  • 8.
    “Library OS” ● ● ● ● ● Single applicationper VM No kernel and userspace separation No fork() MMU access via OSv APIs POSIX APIs for compatibility
  • 9.
  • 10.
  • 11.
    OS Services ● Scheduler ●Memory management ○ mmap ○ demand paging ● Networking ● File system ○ ZFS and ramfs
  • 12.
    APIs ● Linux systemcalls ○ uname() reports Linux for compatibility ● libc ● OSv APIs
  • 13.
    Architectures ● Pure 64-bitOS ● 64-bit x86 ○ ○ ○ ○ KVM Xen HVM Xen PV - incomplete VMware and VirtualBox - in progress ● 64-bit ARM - started! ● Others - help wanted!
  • 14.
    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
  • 15.
  • 16.
    Performance ● Outperforms Linux ○SpecJVM, memcached, netperf ● Same as Linux ○ Tomcat ○ Cassandra ● < 1 second boot time ● 4x faster context switch in scheduler microbenchmarks than Linux
  • 17.
    Image Size ● 17MB 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
  • 18.
    How is OSvdifferent?
  • 19.
    Network channels ● Linuxnetwork 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
  • 20.
    JVM Balloon ● GCheap autotuning ● Steal memory from JVM on OS memory pressure ● Running on unmodified JVM ○ Compacting GC causes interesting problems ● Nice presentation at our youtube channel
  • 21.
    JVM and MMU ●Replace GC card tables with MMU remapping ● Modified OpenJDK ● Azul C4’s GC uses similar MMU tricks on x86 ○ Out-of-tree Linux patches
  • 22.
  • 23.
    OS Admin Traditional OS ● ● ● ● ● Builtfor 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
  • 24.
    Roadmap Alpha Release 3/2014 Git init osv, 12/201 2 support for 64vcpu 02/2013 Java hello world, 01/2013 ZFS support Cli and web > 1Gbps netperf, interface 6/2013 9/2014 UDP, 03/2013 Cassandra outperform s Linux, 8/2013 Native REST API Memcached gain > 70% 1/2014 Tomcat, HAProxy modules 10/2013 Optimized ZFS cache Dirty page writeback JVM page table HV support: GCE, VMW, VBox Net channels JVM ballooning >47Gbps netperf 2/2014 Image Repository JVM Read barrier elimination DPDK support More ...
  • 25.
  • 26.
    Containers ● Docker isawesome ○ Linux control groups not so awesome... ● Fast boot ● Fast provisioning ● Performance
  • 27.
    Containers under thehood ● Shared kernel image ○ Kernel upgrades ○ Hardware maintenance ● Complexity in the kernel ● Copy-on-write userspace
  • 28.
    OSv - bestof 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”
  • 29.
  • 30.
    Thank you! ● Web ○http://osv.io ● Github ○ http://github.com/cloudius-systems/osv ● Mailing List ○ osv-dev@googlegroups.com ● You should follow us on Twitter: ○ @CloudiusSystems