SlideShare a Scribd company logo
1 of 18
Download to read offline
OSv –
Optimizing the Operating System
for Virtual Machines
Avi Kivity, Dor Laor,
Glauber Costa, Pekka Enberg,
Nadav Har'El, Don Marti, Vlad Zolotarov
Cloudius Systems
Problem statement
● Virtual Machines are useful and everywhere.
● A VM runs a guest operating system.
● Usually, guest OS is an existing general-purpose OS,
e.g., Linux.
Can we design a better OS specifically for VMs?
Goals of OSv
OSv: a new OS designed specifically for cloud Vms.
● Run existing cloud applications (Linux executables).
● Run these faster than Linux.
● Explore new APIs for even better performance.
● Use those in a common runtime environment (e.g., JVM)
to also benefit unmodified applications.
Goals of OSv (continued)
● Small image and very quick boot.
– Starting a new VM becomes a viable alternative to
reconfiguring a running one.
● Not tied to specific hypervisor or platform
– 64-bit x86 fully working, 64-bit ARM in progress.
– KVM, Xen, VMware, VirtualBox.
– Amazon EC2 and Google GCE clouds.
Goals of OSv (continued)
● Be a platform for continued research on VM OSs
– Actively developed as open source. http://osv.io/
– Community encourages innovation.
– Small code base compared to Linux.
– Modern programming language: C++11.
– Not limited to particular hypervisor or application
programming language.
– Fully supports SMP guests.
OSv design and implementation
● Process isolation is an important role of traditional OSs.
●
● Enough for VM to run single application
– Already common (“scale-out”).
– Simpler code, eliminate isolation costs.
Hardware
Hypervisor
Application
Guest OS
In the cloud, both
hypervisor and guest
isolate applications.
OSv design and implementation
● Single application
– Single process, multiple threads. Single address space.
– No protection between user-space and kernel.
● System calls are just function calls (Library OS)
– OSv runs Linux shared objects by implementing an ELF
dynamic linker.
– Calls to glibc ABI are resolved to functions in the OSv kernel.
– Even “system calls”, e.g., read(), are ordinary function calls
with none of the traditional system-call overheads.
OSv design and implementation
● Linux compatibility
– To run existing applications, OSv implements most of
the Linux/Glibc ABI.
– Some functions like fork() and exec() are not provided,
as they do not fit OSv's single-application model.
OSv design and implementation
● No spin-locks
– Spin-locks are notorious for VM OSs – cause lock
holders preemption problem.
– Often worked around by para-virtual locks.
– OSv avoids spin-locks entirely.
● Most kernel work is done in threads, which can use a
sleeping mutex.
● Mutex implemention not using a spin-lock.
● The scheduler uses lock-free algorithms.
OSv design and implementation
● Network channels
– Network stack redesign proposed by Van Jacobson in 2006.
– Reduce locks, lock contention and cache-line bounces.
– Typical network stack:
● Interrupt thread processes packets, executes TCP protocol,
writes to buffer.
● Application thread reads from this buffer.
– Network channels:
● Interrupt collects packets in lock-free “channels”.
● TCP protocol executed by application thread on read().
OSv design and implementation
● The core of OSv is new code
– Loader, Dynamic linker, Memory management, Thread scheduler,
Synchronization (e.g., mutex, RCU)
– Virtual hardware drivers:
● PC hardware commonly emulated by hypervisors (Keyboard, VGA,
IDE, HPET, etc.)
● Paravirtual network, disk, and clock drivers (virtio, vmxnet3, pvscsi,
etc.)
● Reused existing open-source code when appropriate:
– C library headers and some functions from Musl-libc.
– The ZFS filesystem from FreeBSD.
– Network stack initially imported from FreeBSD.
Beyond the Linux API
●
OSv lowers the overhead of the Posix APIs.
● Some remaining overheads inherent in Posix API. E.g.,
– read() copies data into “userspace” buffer.
– Operations on socket lock it, as same socket can be
accessed from multiple threads.
● Can we improve performance further with new APIs?
Beyond the Linux API - examples
● Zero-copy lock-less network APIs
● Direct-access to page tables
● Shrinker API: dynamic division of all of available memory.
– JVM Balloon – automatically size JVM heap to available
memory, on unmodified JVM.
Biggest obstacle to new APIs is adoption
● Can start with modifying runtime environment (JVM).
● All unmodified JVM applications would benefit.
Evaluation
●
Compared OSv guest to Fedora 20 guest w/o firewall.
● On KVM host.
● See full details in the paper.
Macro benchmarks
● Memcached. UDP. Single-vCPU guest, loaded with
memaslap (90% get, 10% set)
– OSv throughput 22% better than Linux.
● Memcached reimplemented with packet-filtering API
– OSv throughput 290% better than baseline.
● SPECjvm2008. Suite of CPU/memory intensive Java
workloads. Little use of OS services.
– Can't expect much improvement. Got 0.5%.
– Good correctness test (diverse, checks results).
Micro benchmarks
● Netperf – measure network stack performance.
– TCP single-stream thoughput: 24% improvement.
– UDP and TCP r/r latency: 37%-47% reduction.
● Context switch - two threads, alternate waking each other with
pthreads condition variable.
– 3-10 times faster than in Linux.
– As little as 328 ns when two threads on same CPU.
● JVM Balloon – microbenchmark where large heap and large
page cache are needed, but not at the same time.
– Osv 35% faster than Linux.
Latest unofficial results
● Experimental, non-release, code...
● Need more verification...
– Cassandra stress test, READ, 4 vcpu, 4 GB ram
● OSv 34% better
– Tomcat, servlet sending fixed response, 128 concurrent
HTTP connections, measure throughput. 4 vcpus, 3GB
● OSv 41% better.
Thank you!
● Come visit us at http://osv.io/
– Github source repository
– Mailing list
– Twitter, @CloudiusSystems, #Osv.
●
We invite you to join the OSv open-source project!

More Related Content

What's hot

XPDS14: Xen 4.5 Roadmap - Konrad Wilk, Oracle
XPDS14: Xen 4.5 Roadmap - Konrad Wilk, OracleXPDS14: Xen 4.5 Roadmap - Konrad Wilk, Oracle
XPDS14: Xen 4.5 Roadmap - Konrad Wilk, OracleThe Linux Foundation
 
Ceph Goes on Online at Qihoo 360 - Xuehan Xu
Ceph Goes on Online at Qihoo 360 - Xuehan XuCeph Goes on Online at Qihoo 360 - Xuehan Xu
Ceph Goes on Online at Qihoo 360 - Xuehan XuCeph Community
 
Ceph RBD Update - June 2021
Ceph RBD Update - June 2021Ceph RBD Update - June 2021
Ceph RBD Update - June 2021Ceph Community
 
CloudStack Automated Integration Testing with Marvin
CloudStack Automated Integration Testing with Marvin CloudStack Automated Integration Testing with Marvin
CloudStack Automated Integration Testing with Marvin NetApp
 
Optimizing VM images for OpenStack with KVM/QEMU
Optimizing VM images for OpenStack with KVM/QEMUOptimizing VM images for OpenStack with KVM/QEMU
Optimizing VM images for OpenStack with KVM/QEMUOpenStack Foundation
 
TechDay - Toronto 2016 - Hyperconvergence and OpenNebula
TechDay - Toronto 2016 - Hyperconvergence and OpenNebulaTechDay - Toronto 2016 - Hyperconvergence and OpenNebula
TechDay - Toronto 2016 - Hyperconvergence and OpenNebulaOpenNebula Project
 
Guaranteeing CloudStack Storage Performance
Guaranteeing CloudStack Storage Performance Guaranteeing CloudStack Storage Performance
Guaranteeing CloudStack Storage Performance NetApp
 
Storage based snapshots for KVM VMs in CloudStack
Storage based snapshots for KVM VMs in CloudStackStorage based snapshots for KVM VMs in CloudStack
Storage based snapshots for KVM VMs in CloudStackShapeBlue
 
Openvz booth
Openvz boothOpenvz booth
Openvz boothOpenVZ
 
ops300 Week5 storage (1)
ops300 Week5 storage (1)ops300 Week5 storage (1)
ops300 Week5 storage (1)trayyoo
 
OpenNebulaConf 2016 - Building a GNU/Linux Distribution by Daniel Dehennin, M...
OpenNebulaConf 2016 - Building a GNU/Linux Distribution by Daniel Dehennin, M...OpenNebulaConf 2016 - Building a GNU/Linux Distribution by Daniel Dehennin, M...
OpenNebulaConf 2016 - Building a GNU/Linux Distribution by Daniel Dehennin, M...OpenNebula Project
 
OpenNebulaConf 2016 - The DRBD SDS for OpenNebula by Philipp Reisner, LINBIT
OpenNebulaConf 2016 - The DRBD SDS for OpenNebula by Philipp Reisner, LINBITOpenNebulaConf 2016 - The DRBD SDS for OpenNebula by Philipp Reisner, LINBIT
OpenNebulaConf 2016 - The DRBD SDS for OpenNebula by Philipp Reisner, LINBITOpenNebula Project
 
RBD: What will the future bring? - Jason Dillaman
RBD: What will the future bring? - Jason DillamanRBD: What will the future bring? - Jason Dillaman
RBD: What will the future bring? - Jason DillamanCeph Community
 
Arbiter volumes in gluster
Arbiter volumes in glusterArbiter volumes in gluster
Arbiter volumes in glusteritisravi
 
GFProxy: Scaling the GlusterFS FUSE Client
GFProxy: Scaling the GlusterFS FUSE Client	GFProxy: Scaling the GlusterFS FUSE Client
GFProxy: Scaling the GlusterFS FUSE Client Gluster.org
 
2021.02 new in Ceph Pacific Dashboard
2021.02 new in Ceph Pacific Dashboard2021.02 new in Ceph Pacific Dashboard
2021.02 new in Ceph Pacific DashboardCeph Community
 

What's hot (20)

XPDS14: Xen 4.5 Roadmap - Konrad Wilk, Oracle
XPDS14: Xen 4.5 Roadmap - Konrad Wilk, OracleXPDS14: Xen 4.5 Roadmap - Konrad Wilk, Oracle
XPDS14: Xen 4.5 Roadmap - Konrad Wilk, Oracle
 
Ceph Goes on Online at Qihoo 360 - Xuehan Xu
Ceph Goes on Online at Qihoo 360 - Xuehan XuCeph Goes on Online at Qihoo 360 - Xuehan Xu
Ceph Goes on Online at Qihoo 360 - Xuehan Xu
 
Ceph RBD Update - June 2021
Ceph RBD Update - June 2021Ceph RBD Update - June 2021
Ceph RBD Update - June 2021
 
64-bit ARM Unikernels on uKVM
64-bit ARM Unikernels on uKVM64-bit ARM Unikernels on uKVM
64-bit ARM Unikernels on uKVM
 
CloudStack Automated Integration Testing with Marvin
CloudStack Automated Integration Testing with Marvin CloudStack Automated Integration Testing with Marvin
CloudStack Automated Integration Testing with Marvin
 
Optimizing VM images for OpenStack with KVM/QEMU
Optimizing VM images for OpenStack with KVM/QEMUOptimizing VM images for OpenStack with KVM/QEMU
Optimizing VM images for OpenStack with KVM/QEMU
 
TechDay - Toronto 2016 - Hyperconvergence and OpenNebula
TechDay - Toronto 2016 - Hyperconvergence and OpenNebulaTechDay - Toronto 2016 - Hyperconvergence and OpenNebula
TechDay - Toronto 2016 - Hyperconvergence and OpenNebula
 
Guaranteeing CloudStack Storage Performance
Guaranteeing CloudStack Storage Performance Guaranteeing CloudStack Storage Performance
Guaranteeing CloudStack Storage Performance
 
Storage based snapshots for KVM VMs in CloudStack
Storage based snapshots for KVM VMs in CloudStackStorage based snapshots for KVM VMs in CloudStack
Storage based snapshots for KVM VMs in CloudStack
 
Openvz booth
Openvz boothOpenvz booth
Openvz booth
 
ops300 Week5 storage (1)
ops300 Week5 storage (1)ops300 Week5 storage (1)
ops300 Week5 storage (1)
 
Ceph on Windows
Ceph on WindowsCeph on Windows
Ceph on Windows
 
OpenNebulaConf 2016 - Building a GNU/Linux Distribution by Daniel Dehennin, M...
OpenNebulaConf 2016 - Building a GNU/Linux Distribution by Daniel Dehennin, M...OpenNebulaConf 2016 - Building a GNU/Linux Distribution by Daniel Dehennin, M...
OpenNebulaConf 2016 - Building a GNU/Linux Distribution by Daniel Dehennin, M...
 
OpenNebulaConf 2016 - The DRBD SDS for OpenNebula by Philipp Reisner, LINBIT
OpenNebulaConf 2016 - The DRBD SDS for OpenNebula by Philipp Reisner, LINBITOpenNebulaConf 2016 - The DRBD SDS for OpenNebula by Philipp Reisner, LINBIT
OpenNebulaConf 2016 - The DRBD SDS for OpenNebula by Philipp Reisner, LINBIT
 
RBD: What will the future bring? - Jason Dillaman
RBD: What will the future bring? - Jason DillamanRBD: What will the future bring? - Jason Dillaman
RBD: What will the future bring? - Jason Dillaman
 
Ceph on arm64 upload
Ceph on arm64   uploadCeph on arm64   upload
Ceph on arm64 upload
 
Arbiter volumes in gluster
Arbiter volumes in glusterArbiter volumes in gluster
Arbiter volumes in gluster
 
CephFS Update
CephFS UpdateCephFS Update
CephFS Update
 
GFProxy: Scaling the GlusterFS FUSE Client
GFProxy: Scaling the GlusterFS FUSE Client	GFProxy: Scaling the GlusterFS FUSE Client
GFProxy: Scaling the GlusterFS FUSE Client
 
2021.02 new in Ceph Pacific Dashboard
2021.02 new in Ceph Pacific Dashboard2021.02 new in Ceph Pacific Dashboard
2021.02 new in Ceph Pacific Dashboard
 

Similar to OSv at Usenix ATC 2014

BKK16-409 VOSY Switch Port to ARMv8 Platforms and ODP Integration
BKK16-409 VOSY Switch Port to ARMv8 Platforms and ODP IntegrationBKK16-409 VOSY Switch Port to ARMv8 Platforms and ODP Integration
BKK16-409 VOSY Switch Port to ARMv8 Platforms and ODP IntegrationLinaro
 
KVM and docker LXC Benchmarking with OpenStack
KVM and docker LXC Benchmarking with OpenStackKVM and docker LXC Benchmarking with OpenStack
KVM and docker LXC Benchmarking with OpenStackBoden Russell
 
Running Applications on the NetBSD Rump Kernel by Justin Cormack
Running Applications on the NetBSD Rump Kernel by Justin Cormack Running Applications on the NetBSD Rump Kernel by Justin Cormack
Running Applications on the NetBSD Rump Kernel by Justin Cormack eurobsdcon
 
Academy PRO: Docker. Part 1
Academy PRO: Docker. Part 1Academy PRO: Docker. Part 1
Academy PRO: Docker. Part 1Binary Studio
 
Academy PRO: Docker. Lecture 1
Academy PRO: Docker. Lecture 1Academy PRO: Docker. Lecture 1
Academy PRO: Docker. Lecture 1Binary Studio
 
Direct Code Execution - LinuxCon Japan 2014
Direct Code Execution - LinuxCon Japan 2014Direct Code Execution - LinuxCon Japan 2014
Direct Code Execution - LinuxCon Japan 2014Hajime Tazaki
 
Rmll Virtualization As Is Tool 20090707 V1.0
Rmll Virtualization As Is Tool 20090707 V1.0Rmll Virtualization As Is Tool 20090707 V1.0
Rmll Virtualization As Is Tool 20090707 V1.0guest72e8c1
 
Network Stack in Userspace (NUSE)
Network Stack in Userspace (NUSE)Network Stack in Userspace (NUSE)
Network Stack in Userspace (NUSE)Hajime Tazaki
 
elfconv: AOT compiler that translates Linux/AArch64 ELF binary to LLVM bitcod...
elfconv: AOT compiler that translates Linux/AArch64 ELF binary to LLVM bitcod...elfconv: AOT compiler that translates Linux/AArch64 ELF binary to LLVM bitcod...
elfconv: AOT compiler that translates Linux/AArch64 ELF binary to LLVM bitcod...Masashi Yoshimura
 
Unikraft: Fast, Specialized Unikernels the Easy Way
Unikraft: Fast, Specialized Unikernels the Easy WayUnikraft: Fast, Specialized Unikernels the Easy Way
Unikraft: Fast, Specialized Unikernels the Easy WayScyllaDB
 
DPDK Summit - 08 Sept 2014 - Futurewei - Jun Xu - Revisit the IP Stack in Lin...
DPDK Summit - 08 Sept 2014 - Futurewei - Jun Xu - Revisit the IP Stack in Lin...DPDK Summit - 08 Sept 2014 - Futurewei - Jun Xu - Revisit the IP Stack in Lin...
DPDK Summit - 08 Sept 2014 - Futurewei - Jun Xu - Revisit the IP Stack in Lin...Jim St. Leger
 
Noah - Robust and Flexible Operating System Compatibility Architecture - Cont...
Noah - Robust and Flexible Operating System Compatibility Architecture - Cont...Noah - Robust and Flexible Operating System Compatibility Architecture - Cont...
Noah - Robust and Flexible Operating System Compatibility Architecture - Cont...Takaya Saeki
 
An Introduce of OPNFV (Open Platform for NFV)
An Introduce of OPNFV (Open Platform for NFV)An Introduce of OPNFV (Open Platform for NFV)
An Introduce of OPNFV (Open Platform for NFV)Mario Cho
 
Achieving the Ultimate Performance with KVM
Achieving the Ultimate Performance with KVMAchieving the Ultimate Performance with KVM
Achieving the Ultimate Performance with KVMDevOps.com
 
Fedora Virtualization Day: Linux Containers & CRIU
Fedora Virtualization Day: Linux Containers & CRIUFedora Virtualization Day: Linux Containers & CRIU
Fedora Virtualization Day: Linux Containers & CRIUAndrey Vagin
 
mSwitch: A Highly-Scalable, Modular Software Switch
mSwitch: A Highly-Scalable, Modular Software SwitchmSwitch: A Highly-Scalable, Modular Software Switch
mSwitch: A Highly-Scalable, Modular Software Switchmicchie
 

Similar to OSv at Usenix ATC 2014 (20)

BKK16-409 VOSY Switch Port to ARMv8 Platforms and ODP Integration
BKK16-409 VOSY Switch Port to ARMv8 Platforms and ODP IntegrationBKK16-409 VOSY Switch Port to ARMv8 Platforms and ODP Integration
BKK16-409 VOSY Switch Port to ARMv8 Platforms and ODP Integration
 
KVM and docker LXC Benchmarking with OpenStack
KVM and docker LXC Benchmarking with OpenStackKVM and docker LXC Benchmarking with OpenStack
KVM and docker LXC Benchmarking with OpenStack
 
Running Applications on the NetBSD Rump Kernel by Justin Cormack
Running Applications on the NetBSD Rump Kernel by Justin Cormack Running Applications on the NetBSD Rump Kernel by Justin Cormack
Running Applications on the NetBSD Rump Kernel by Justin Cormack
 
Academy PRO: Docker. Part 1
Academy PRO: Docker. Part 1Academy PRO: Docker. Part 1
Academy PRO: Docker. Part 1
 
Academy PRO: Docker. Lecture 1
Academy PRO: Docker. Lecture 1Academy PRO: Docker. Lecture 1
Academy PRO: Docker. Lecture 1
 
OpenVZ Linux Containers
OpenVZ Linux ContainersOpenVZ Linux Containers
OpenVZ Linux Containers
 
mTCP使ってみた
mTCP使ってみたmTCP使ってみた
mTCP使ってみた
 
Direct Code Execution - LinuxCon Japan 2014
Direct Code Execution - LinuxCon Japan 2014Direct Code Execution - LinuxCon Japan 2014
Direct Code Execution - LinuxCon Japan 2014
 
Node js internal
Node js internalNode js internal
Node js internal
 
RMLL / LSM 2009
RMLL / LSM 2009RMLL / LSM 2009
RMLL / LSM 2009
 
Rmll Virtualization As Is Tool 20090707 V1.0
Rmll Virtualization As Is Tool 20090707 V1.0Rmll Virtualization As Is Tool 20090707 V1.0
Rmll Virtualization As Is Tool 20090707 V1.0
 
Network Stack in Userspace (NUSE)
Network Stack in Userspace (NUSE)Network Stack in Userspace (NUSE)
Network Stack in Userspace (NUSE)
 
elfconv: AOT compiler that translates Linux/AArch64 ELF binary to LLVM bitcod...
elfconv: AOT compiler that translates Linux/AArch64 ELF binary to LLVM bitcod...elfconv: AOT compiler that translates Linux/AArch64 ELF binary to LLVM bitcod...
elfconv: AOT compiler that translates Linux/AArch64 ELF binary to LLVM bitcod...
 
Unikraft: Fast, Specialized Unikernels the Easy Way
Unikraft: Fast, Specialized Unikernels the Easy WayUnikraft: Fast, Specialized Unikernels the Easy Way
Unikraft: Fast, Specialized Unikernels the Easy Way
 
DPDK Summit - 08 Sept 2014 - Futurewei - Jun Xu - Revisit the IP Stack in Lin...
DPDK Summit - 08 Sept 2014 - Futurewei - Jun Xu - Revisit the IP Stack in Lin...DPDK Summit - 08 Sept 2014 - Futurewei - Jun Xu - Revisit the IP Stack in Lin...
DPDK Summit - 08 Sept 2014 - Futurewei - Jun Xu - Revisit the IP Stack in Lin...
 
Noah - Robust and Flexible Operating System Compatibility Architecture - Cont...
Noah - Robust and Flexible Operating System Compatibility Architecture - Cont...Noah - Robust and Flexible Operating System Compatibility Architecture - Cont...
Noah - Robust and Flexible Operating System Compatibility Architecture - Cont...
 
An Introduce of OPNFV (Open Platform for NFV)
An Introduce of OPNFV (Open Platform for NFV)An Introduce of OPNFV (Open Platform for NFV)
An Introduce of OPNFV (Open Platform for NFV)
 
Achieving the Ultimate Performance with KVM
Achieving the Ultimate Performance with KVMAchieving the Ultimate Performance with KVM
Achieving the Ultimate Performance with KVM
 
Fedora Virtualization Day: Linux Containers & CRIU
Fedora Virtualization Day: Linux Containers & CRIUFedora Virtualization Day: Linux Containers & CRIU
Fedora Virtualization Day: Linux Containers & CRIU
 
mSwitch: A Highly-Scalable, Modular Software Switch
mSwitch: A Highly-Scalable, Modular Software SwitchmSwitch: A Highly-Scalable, Modular Software Switch
mSwitch: A Highly-Scalable, Modular Software Switch
 

Recently uploaded

The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...panagenda
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...Health
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsJhone kinadey
 
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfAzure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfryanfarris8
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...OnePlan Solutions
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionSolGuruz
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerThousandEyes
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionOnePlan Solutions
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...harshavardhanraghave
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 

Recently uploaded (20)

CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfAzure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 

OSv at Usenix ATC 2014

  • 1. OSv – Optimizing the Operating System for Virtual Machines Avi Kivity, Dor Laor, Glauber Costa, Pekka Enberg, Nadav Har'El, Don Marti, Vlad Zolotarov Cloudius Systems
  • 2. Problem statement ● Virtual Machines are useful and everywhere. ● A VM runs a guest operating system. ● Usually, guest OS is an existing general-purpose OS, e.g., Linux. Can we design a better OS specifically for VMs?
  • 3. Goals of OSv OSv: a new OS designed specifically for cloud Vms. ● Run existing cloud applications (Linux executables). ● Run these faster than Linux. ● Explore new APIs for even better performance. ● Use those in a common runtime environment (e.g., JVM) to also benefit unmodified applications.
  • 4. Goals of OSv (continued) ● Small image and very quick boot. – Starting a new VM becomes a viable alternative to reconfiguring a running one. ● Not tied to specific hypervisor or platform – 64-bit x86 fully working, 64-bit ARM in progress. – KVM, Xen, VMware, VirtualBox. – Amazon EC2 and Google GCE clouds.
  • 5. Goals of OSv (continued) ● Be a platform for continued research on VM OSs – Actively developed as open source. http://osv.io/ – Community encourages innovation. – Small code base compared to Linux. – Modern programming language: C++11. – Not limited to particular hypervisor or application programming language. – Fully supports SMP guests.
  • 6. OSv design and implementation ● Process isolation is an important role of traditional OSs. ● ● Enough for VM to run single application – Already common (“scale-out”). – Simpler code, eliminate isolation costs. Hardware Hypervisor Application Guest OS In the cloud, both hypervisor and guest isolate applications.
  • 7. OSv design and implementation ● Single application – Single process, multiple threads. Single address space. – No protection between user-space and kernel. ● System calls are just function calls (Library OS) – OSv runs Linux shared objects by implementing an ELF dynamic linker. – Calls to glibc ABI are resolved to functions in the OSv kernel. – Even “system calls”, e.g., read(), are ordinary function calls with none of the traditional system-call overheads.
  • 8. OSv design and implementation ● Linux compatibility – To run existing applications, OSv implements most of the Linux/Glibc ABI. – Some functions like fork() and exec() are not provided, as they do not fit OSv's single-application model.
  • 9. OSv design and implementation ● No spin-locks – Spin-locks are notorious for VM OSs – cause lock holders preemption problem. – Often worked around by para-virtual locks. – OSv avoids spin-locks entirely. ● Most kernel work is done in threads, which can use a sleeping mutex. ● Mutex implemention not using a spin-lock. ● The scheduler uses lock-free algorithms.
  • 10. OSv design and implementation ● Network channels – Network stack redesign proposed by Van Jacobson in 2006. – Reduce locks, lock contention and cache-line bounces. – Typical network stack: ● Interrupt thread processes packets, executes TCP protocol, writes to buffer. ● Application thread reads from this buffer. – Network channels: ● Interrupt collects packets in lock-free “channels”. ● TCP protocol executed by application thread on read().
  • 11. OSv design and implementation ● The core of OSv is new code – Loader, Dynamic linker, Memory management, Thread scheduler, Synchronization (e.g., mutex, RCU) – Virtual hardware drivers: ● PC hardware commonly emulated by hypervisors (Keyboard, VGA, IDE, HPET, etc.) ● Paravirtual network, disk, and clock drivers (virtio, vmxnet3, pvscsi, etc.) ● Reused existing open-source code when appropriate: – C library headers and some functions from Musl-libc. – The ZFS filesystem from FreeBSD. – Network stack initially imported from FreeBSD.
  • 12. Beyond the Linux API ● OSv lowers the overhead of the Posix APIs. ● Some remaining overheads inherent in Posix API. E.g., – read() copies data into “userspace” buffer. – Operations on socket lock it, as same socket can be accessed from multiple threads. ● Can we improve performance further with new APIs?
  • 13. Beyond the Linux API - examples ● Zero-copy lock-less network APIs ● Direct-access to page tables ● Shrinker API: dynamic division of all of available memory. – JVM Balloon – automatically size JVM heap to available memory, on unmodified JVM. Biggest obstacle to new APIs is adoption ● Can start with modifying runtime environment (JVM). ● All unmodified JVM applications would benefit.
  • 14. Evaluation ● Compared OSv guest to Fedora 20 guest w/o firewall. ● On KVM host. ● See full details in the paper.
  • 15. Macro benchmarks ● Memcached. UDP. Single-vCPU guest, loaded with memaslap (90% get, 10% set) – OSv throughput 22% better than Linux. ● Memcached reimplemented with packet-filtering API – OSv throughput 290% better than baseline. ● SPECjvm2008. Suite of CPU/memory intensive Java workloads. Little use of OS services. – Can't expect much improvement. Got 0.5%. – Good correctness test (diverse, checks results).
  • 16. Micro benchmarks ● Netperf – measure network stack performance. – TCP single-stream thoughput: 24% improvement. – UDP and TCP r/r latency: 37%-47% reduction. ● Context switch - two threads, alternate waking each other with pthreads condition variable. – 3-10 times faster than in Linux. – As little as 328 ns when two threads on same CPU. ● JVM Balloon – microbenchmark where large heap and large page cache are needed, but not at the same time. – Osv 35% faster than Linux.
  • 17. Latest unofficial results ● Experimental, non-release, code... ● Need more verification... – Cassandra stress test, READ, 4 vcpu, 4 GB ram ● OSv 34% better – Tomcat, servlet sending fixed response, 128 concurrent HTTP connections, measure throughput. 4 vcpus, 3GB ● OSv 41% better.
  • 18. Thank you! ● Come visit us at http://osv.io/ – Github source repository – Mailing list – Twitter, @CloudiusSystems, #Osv. ● We invite you to join the OSv open-source project!