Using SmartOS as a Hypervisor



Similar documents
Virtualization and Performance NSRC

Solaris For The Modern Data Center. Taking Advantage of Solaris 11 Features

Virtualization in Linux KVM + QEMU

NexentaStor Enterprise Backend for CLOUD. Marek Lubinski Marek Lubinski Sr VMware/Storage Engineer, LeaseWeb B.V.

Private Cloud Devotional

Uses for Virtual Machines. Virtual Machines. There are several uses for virtual machines:

INCREASING EFFICIENCY WITH EASY AND COMPREHENSIVE STORAGE MANAGEMENT

Oracle Solaris: Aktueller Stand und Ausblick

ZFS In Business. Roch Bourbonnais Sun Microsystems

Delivering SDS simplicity and extreme performance

Virtualization. Dr. Yingwu Zhu

9/26/2011. What is Virtualization? What are the different types of virtualization.

Version 3.7 Technical Whitepaper

Nested Virtualization

Oracle Solaris Security: Mitigate Risk by Isolating Users, Applications, and Data

Performance tuning Xen

The Art of Virtualization with Free Software

Chapter 16: Virtual Machines. Operating System Concepts 9 th Edition

Linux/Open Source and Cloud computing Wim Coekaerts Senior Vice President, Linux and Virtualization Engineering

Hypervisors. Introduction. Introduction. Introduction. Introduction. Introduction. Credits:

Pete s All Things Sun: Comparing Solaris to RedHat Enterprise and AIX Virtualization Features

Enterprise-Class Virtualization with Open Source Technologies

SQL Server Virtualization

HRG Assessment: Stratus everrun Enterprise

Rackspace Cloud Databases and Container-based Virtualization

WHITE PAPER Improving Storage Efficiencies with Data Deduplication and Compression

VMware and CPU Virtualization Technology. Jack Lo Sr. Director, R&D

Virtualization. Types of Interfaces

Nested Virtualization

Hardware Based Virtualization Technologies. Elsie Wahlig Platform Software Architect

Part 1 - What s New in Hyper-V 2012 R2. Clive.Watson@Microsoft.com Datacenter Specialist

An Oracle Technical White Paper November Oracle Solaris 11 Network Virtualization and Network Resource Management

Best Practices for Virtualised SharePoint

ZFS Backup Platform. ZFS Backup Platform. Senior Systems Analyst TalkTalk Group. Robert Milkowski.

CompTIA Cloud+ 9318; 5 Days, Instructor-led

VMware Server 2.0 Essentials. Virtualization Deployment and Management

CompTIA Cloud+ Course Content. Length: 5 Days. Who Should Attend:

Preparation Guide. How to prepare your environment for an OnApp Cloud v3.0 (beta) deployment.

Virtualization. Michael Tsai 2015/06/08

IOS110. Virtualization 5/27/2014 1

Windows Server 2012 R2 Hyper-V: Designing for the Real World

HOW TRUENAS LEVERAGES OPENZFS. Storage and Servers Driven by Open Source.

NetScaler VPX FAQ. Table of Contents

ORACLE OPS CENTER: PROVISIONING AND PATCH AUTOMATION PACK

Best Practices for Optimizing Your Linux VPS and Cloud Server Infrastructure

ZFS Administration 1

High Performance Computing Specialists. ZFS Storage as a Solution for Big Data and Flexibility

xvm Server and xvm VirtualBox Christopher Beal Principal Engineer

Kernel Virtual Machine

Real-Time Virtualization How Crazy Are We?

Virtualization Technologies and Blackboard: The Future of Blackboard Software on Multi-Core Technologies

RPM Brotherhood: KVM VIRTUALIZATION TECHNOLOGY

Compromise-as-a-Service

Advanced Computer Networks. Network I/O Virtualization

Microsoft Private Cloud Fast Track

SOLUTION BRIEF. Resolving the VDI Storage Challenge

Virtualizing a Virtual Machine

Database Virtualization Technologies

2972 Linux Options and Best Practices for Scaleup Virtualization

Windows Server 2008 R2 Hyper V. Public FAQ

Database Virtualization

760 Veterans Circle, Warminster, PA Technical Proposal. Submitted by: ACT/Technico 760 Veterans Circle Warminster, PA

The High-Performance Cloud Infrastructure Company! 2011 Joyent, Inc. Contains Joyent Restricted Secrets. Not for Public Disclosure. Patents Pending.!

Red Hat Network Satellite Management and automation of your Red Hat Enterprise Linux environment

Week Overview. Installing Linux Linux on your Desktop Virtualization Basic Linux system administration

Red Hat Satellite Management and automation of your Red Hat Enterprise Linux environment

Open Source Virtualization

MaxDeploy Hyper- Converged Reference Architecture Solution Brief

A quantitative comparison between xen and kvm

Masters Project Proposal

Nested Virtualization

Enabling Technologies for Distributed Computing

Cloud Architecture and Virtualisation. Lecture 4 Virtualisation

PARALLELS SERVER 4 BARE METAL README

Intel s Virtualization Extensions (VT-x) So you want to build a hypervisor?

Hypervisors and Virtual Machines

PARALLELS SERVER BARE METAL 5.0 README

Virtualization Technology

What s new in Hyper-V 2012 R2

Barracuda Backup Vx. Virtual Appliance Deployment. White Paper

An Oracle White Paper August Oracle VM 3: Server Pool Deployment Planning Considerations for Scalability and Availability

Introduction to Virtual Machines

An Oracle White Paper July Expanding the Storage Capabilities of the Oracle Database Appliance

Zadara Storage Cloud A

StACC: St Andrews Cloud Computing Co laboratory. A Performance Comparison of Clouds. Amazon EC2 and Ubuntu Enterprise Cloud

Cloud Server. Parallels. An Introduction to Operating System Virtualization and Parallels Cloud Server. White Paper.

Cloud Optimize Your IT

Deploying and Optimizing SQL Server for Virtual Machines

MaxDeploy Ready. Hyper- Converged Virtualization Solution. With SanDisk Fusion iomemory products

File System & Device Drive. Overview of Mass Storage Structure. Moving head Disk Mechanism. HDD Pictures 11/13/2014. CS341: Operating System

Deep Dive on SimpliVity s OmniStack A Technical Whitepaper

Transcription:

Using SmartOS as a Hypervisor SCALE 10x Robert Mustacchi rm@joyent.com (@rmustacc) Software Engineer

What is SmartOS? Solaris heritage Zones - OS level virtualization Crossbow - virtual NICs ZFS - pooled storage, data integrity DTrace - production safe Dynamic Tracing Hypervisor Focus Core OS image booted from external media Persist user data and minimal convenience config Tools to simplify management KVM - Hardware Virtualization Open Source distribution of illumos illumos is the successor of OpenSolaris 2

Zones - OS Level Virtualization 3 A zone is an entirely self-managed container Configure own users, disks, networking, services Feels like a standalone OS Isolation Zones can t see each other Global zone can inspect local zones Exclusive network stacks Filesystem isolation Resource Controls Memory, Disk and Network I/O CPU Shares and Caps Privileges Zone Brands Sparse Legacy support - S10

Physical NIC Physical NIC Virtual NIC Virtual NIC Virtual NIC Virtual NIC Virtual NIC Virtual NIC OS Virtualization Minimal overhead - no hardware to emulate Share the same kernel - higher density Global Zone Virtual OS (zone) Virtual OS (zone)... Virtual OS (zone) Physical node Tens/hundreds per datacenter SmartOS kernel Allows for services in the global zone to inspect the others e.g. DTrace 4

Crossbow - Virtual NICs Create virtual NICs and virtual switches Connect VNICs to: Physical NICs Virtual switch Antispoof MAC address IP addresses DHCP Bandwidth controls Simple as `dladm create-vnic -l igb0 foo0` 5

ZFS - Using disks better ZFS is a copy on write filesystem Pooled Storage Don t have to guess your partition sizes Managed in datasets Quotas and reservations can be changed on the fly zvols - virtual block devices Multiple RAID options RAID 1 (Mirroring) RAID Z1, Z2, Z3 (Single, double, and triple parity) RAID 0 (Striping) 6

ZFS - Using data better Enterprise features built in 128-bit Checksums on everything Data Integrity Compression Deduplication Adaptive Replacement Cache Hybrid Storage SLOG L2ARC 7

ZFS Snapshots and Clones Snapshots are cheap to take You can clone a snapshot into a read/write copy Send/Recv incremental snapshots Clone Writes Dataset FS or Vol Writes Snapshot Snapshot Clone Writes Snapshot Clone Snapshot Writes 8

DTrace Dynamic instrumentation of production systems Originally released in 2003 for Solaris 10, open-sourced in 2005 Available on SmartOS, illumos, and all other Solaris-derived systems Available on Mac OS X, FreeBSD, QNX, and WIP on Linux, NetBSD, Sony Vita Supports static and dynamic probes in both userland and the kernel with arbitrary actions and predicates Aggregates data in the kernel Allows us to support high numbers of events per second Designed to be safe for production use from the get go 9

DTrace Example: MySQL Query Latency MySQL query latency can be measured with a (long) one-liner: # dtrace n mysql*:::query-start { self->start = timestamp; } mysql*:::query-done /self->start/ { @[ nanoseconds ] = quantize(timestamp self->start); } self->start = 0; nanoseconds value ------------- Distribution ------------- count 1024 0 2048 16 4096 @ 93 8192 19 16384 @@@ 232 32768 @@ 172 65536 @@@@@@ 532 131072 @@@@@@@@@@@@@@@@@ 1513 262144 @@@@@ 428 524288 @@@ 258 1048576 @ 127 2097152 @ 47 4194304 20 8388608 33 16777216 9 33554432 0 10

Porting KVM Why? People need to virtualize existing build out Give flexibility to run other OSes Still need all the other technology we talked about Joyent started the port in Fall of 2010 and released it at KVM Forum in August 2011 Actively used in production in Joyent s Public Cloud Only Intel processors with EPT currently supported Community working on AMD support (Josh Clulow, Rich Lowe,...) Porting gotchas Didn t find new bugs in KVM - just self inflicted wounds Duplicate PITs Not properly saving per-cpu GSBASE Not properly resetting FPU state 11

Put QEMU in a Zone Each QEMU instance is init in its own KVM branded zone Only kvm branded zones get /dev/kvm by default Zone reduces QEMU Attack surface Leverages zones features for isolation and limited privileges 12

Arming QEMU with Crossbow Wrote a new QEMU network backend to use a VNIC Each NIC in the guest corresponds to a VNIC in the host VNIC backend has an optional DHCP server Antispoof is enabled by default Portions of antispoof eliminated if not needed Enables insight into guest networking throughput 13

Back QEMU with ZFS Each disk in the guest is backed with a zvol (virtual block device) You can snapshot and rollback the zvols ARC can help with random reads, SLOG with synch writes Rapid provisioning through clones Create a small basic golden install Clone that for every provision Create an empty data disk based on need Less than one minute from provision to ping This process is automated with vmadm(1m) Leverage ZFS send and receive for replication and backup 14

KVM meet DTrace As of QEMU 0.14, QEMU has DTrace probes we lit those up on illumos Added a bevy of SDT probes to KVM itself including all of the call-sites of the trace_*() routines Added vmregs[] variable that queries current VMCS See guest registers Can all be enabled dynamically and safely, and aggregated on an arbitrary basis per-vcpu, per-vm, per-cpu, etc. 15

Seeing DTrace - ext3 writes 16

Seeing DTrace - KVM IRQs 17

Seeing DTrace - KVM Disk I/O Latency 18

Seeing DTrace - KVM CPU Sampling 19

What is DTrace doing? We sample the CPUs at 99 hz (can do higher rates) We read the guest s value of CR3 from the VMCS We aggregate with CR3 as the key The value is the distribution of when in the second profile:::profile-99hz { @[(lltostr(vmregs[vmx_guest_cr3], 16))] = lquantize(((timestamp) % 1000000000) / 1000000, 0, 1000, 10); } 20

Can we do better? Why can t we DTrace into the guest? Get a little help from the guest - symbol table Add the knowledge of how to walk EPT What once were traps have to become VMEXITS It s all program text, just in QEMU s address space Providers vfbt - Entry and return from function in the kernel vsyscall - Entry and return from system calls vpid?! - Trace guest userland processes 21

Wrapping up: SmartOS as a Hypervisor High-tenancy: SmartOS containers OS flexibility: KVM Highly observable with DTrace Strong Isolation and Protection Zones and Crossbow Data is protected and easy to manage Pooled storage and datasets Management tools - vmadm 22

Thank you SmartOS Resources Download SmartOS - http://smartos.org SmartOS Mailing List - http://smartos.org/smartos-mailing-list/ SmartOS Wiki - http://wiki.smartos.org illumos - http://illumos.org Contribute to SmartOS - http://github.com/joyent/smartos-live Hop into #illumos on irc.freenode.net and say hello Thanks Max Bruning and Bryan Cantrill for their work on KVM Josh Wilsdon for vmadm John Sonnenschein for driving all the SmartOS resources Joyent and illumos community for their support SCALE10x volunteers for a great conference rm@joyent.com, rmustacc on freenode/twitter 23