Lock in $30 Savings on PRO—Offer Ends Soon! ⏳

OSv, a New Operating System Designed for the Cloud

Pekka Enberg
February 01, 2014

OSv, a New Operating System Designed for the Cloud

OSv is a new open source operating system for the cloud. It is designed to run a single application per virtual machine and its tuned for applications running under the Java virtual machine.

In this talk, we will introduce OSv, showcase its architecture, and explain performance and application management improvements. We will also talk about OSv specific improvements to the JVM that improve application performance in virtualized environments.

Operating system developers, as well as application developers who deploy to the cloud, may enjoy the talk. No special expertise is required.

* Why do we need a Cloud Operating System?
* OSv design overview
* JVM optimizations for OSv and the cloud
* Management
* Performance
* Future

Pekka Enberg

February 01, 2014
Tweet

Other Decks in Technology

Transcript

  1. About Cloudius • Founded in December 2012 • ~14 people

    • 7 countries • Open source experience • Linux Foundation member
  2. 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
  3. • Single application per VM • No kernel and userspace

    separation • No fork() • MMU access via OSv APIs • POSIX APIs for compatibility “Library OS”
  4. OS Services • Scheduler • Memory management ◦ mmap ◦

    demand paging • Networking • File system ◦ ZFS and ramfs
  5. • Pure 64-bit OS • 64-bit x86 ◦ KVM ◦

    Xen HVM ◦ Xen PV - incomplete ◦ VMware and VirtualBox - in progress • 64-bit ARM - planned • Others - help wanted! Architectures
  6. 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
  7. Performance • Outperforms Linux ◦ SpecJVM, memcached, netperf • Same

    as Linux ◦ Tomcat ◦ Cassandra • < 1 second boot time • 4x faster context switch in scheduler microbenchmarks than Linux
  8. 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
  9. • 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
  10. JVM Balloon • GC heap autotuning • Steal memory from

    JVM on OS memory pressure • Running on unmodified JVM ◦ Compacting GC causes interesting problems • Nice presentation by Glauber Costa on Youtube
  11. • 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
  12. 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
  13. Admin as collection of services OSv OSv OSv OSv Operation

    Configuration Packaging OSv Trace / Log Binary REST Metering Centralize Administration
  14. Operation Service Base on REST API (GET, POST, …) Successful

    Sync operations - 200 Successful A-sync operation - 202 A-sync operation result available in log with correlation id REST API definition use Swagger OSv OSv OSv Operations OSv
  15. Configuration Service Level of configuration: 1. Image configuration: capture as

    part of the image. 2. Init configuration: update at init phase (as in cloud-init) 3. Runtime configuration: instance lifetime No configuration overriding Same API for all configuration levels API is the only way to access configuration Configuration is ordered in a tree structure OSv OSv OSv Configuration OSv
  16. Packaging Services pull Base App repository run search new App

    ops commit push run util OSv OSv OSv Packaging OSv
  17. Packaging Services Repository operations search <string> pull user/app - download

    pre built image push user/app - upload a new image to the repository VM operations run app - start OSv instance kill app - kill a running OSv node VM interactions app deploy bar.jar - deploy a jar to an instance app deploy foo.rpm - add a RPM to an instance run app cli - open an interactive shell OSv OSv OSv Packaging OSv
  18. Log / Trap Service OSv OSv OSv Log Traps Requirements

    Log Traps Direction Outbound Outbound Bandwidth High Low Reliable No Yes Format Binary/Text Binary/Text Alternatives RabbitMQ ZeroMQ Gelf ... See Log SNMP MQTT JMX
  19. Alpha Release 3/2014 Optimized ZFS cache Dirty page writeback JVM

    page table HV support: GCE, VMW, VBox Git init osv, 12/201 2 Java hello world, 01/2013 support for 64 vcpu 02/2013 UDP, 03/2013 ZFS support > 1Gbps netperf, 6/2013 Cassandra outperform s Linux, 8/2013 Native REST API Memcached gain > 70% 1/2014 Cli and web interface 9/2014 Tomcat, HAProxy modules 10/2013 Net channels JVM ballooning >47Gbps netperf 2/2014 Image Repository JVM Read barrier elimination DPDK support More ... Roadmap
  20. Containers • Docker is awesome ◦ Linux control groups not

    so awesome... • Fast boot • Fast provisioning • Performance
  21. Containers under the hood • Shared kernel image ◦ Kernel

    upgrades ◦ Hardware maintenance • Complexity in the kernel • Copy-on-write userspace
  22. OSv - best of both worlds? • Fast boot, fast

    provisioning, performance • Virtualized ◦ Live migration ◦ Elasticity ◦ MMU access • Great blog post on Google+ “OSv vs containers” by Glauber Costa
  23. Thank you! • Web ◦ http://osv.io • Github ◦ http://github.com/cloudius-systems/osv

    • Mailing List ◦ [email protected] • You should follow us on Twitter: ◦ @CloudiusSystems ◦ @penberg ◦ @TzachL