Cloudius Systems Announced OSv, an Operating System for the Cloud
While projects like Docker and ProxMox attempt to upset the apple cart of virtualization from the hypervisor layer with containers, OSv is taking a completely different route. OSv is not a Linux distribution, it is a completely new operating system built from the ground up to run in the cloud. The purpose of OSv is to build a super-streamlined environment to run a single application as a virtual machine in Xen, KVM, VMware, or Amazon EC2. OSv continues the trend in virtualization of stripping down the system to its bare essentials, but OSv takes it to a whole new level.
OSv claims to be far more efficient in running in a virtual machine than a traditional Linux (or otherwise) operating system. They achieve this efficiency by removing many of the security mechanisims put in place to protect the kernel from the application. For example, the application runs in the kernel's address space. OSv also removes "spin-locks", and runs interrupts in normal threads. Also interesting is that the OSv team has chosen ZFS as their default filesystem, which should provide some interesting management and deployment capabilities as the project matures.
How fast OSv is comparable to a stripped down, minimal Linux virtual machine is yet to be determined. OSv is still a very young project, and will need time and trials to shake out all the bugs. The developers do address the question of "why another operating system" though:
Today’s cloud-based applications run a heavyweight stack: the hypervisor, which divides the hardware resources among virtual machines; the operating system, which divides the virtual machine’s resources among applications; and the application server, which divides the application’s resources among the end users.
Clearly, there is a lot of duplication going on. Each layer adds its own overhead in an attempt to abstract away and hide the problems caused by the lower layer. The result is inefficient and complex.
Currently, OSv is being built specifically to run a JVM.
Running in the same address space as the Java Virtual Machine allows OSv to expose hardware features, such as the page tables, directly to the Java Virtual Machine. This in turn allows the JVM to manage memory more efficiently than is possible with traditional APIs (mmap() and friends). Among the possibilities for exploiting the hardware are:
* Direct use of large pages (2MB and 1GB pages)
* Using the page tables to track memory modifications, to aid with garbage collection
* Cooperative scheduling and prioritization of critical GC threads
* Remap the memory instead copying large swept objects.
OSv can also run certain C based applications like MemCacheD, and should be able to port other existing applications over as long as the applications do not fork().
Cloudius has posted the presentations slides from CloudOpen 2013 as a Google Doc, and have a good overview of the project on their home page. OSv is completely open source, licensed under a three clause BSD style license, and available to download and hack on now.