SlideShare una empresa de Scribd logo
1 de 22
Descargar para leer sin conexión
KVM: Virtualisation The
Linux Way
Amit Shah
amit.shah@qumranet.com




GEEP
Virtualisation Strategies

 “Native” Hypervisors
    Have a runtime
    Need a “primary” guest OS
    Examples: Xen, VMWare ESX Server, IBM mainframes
 Containers
   Different namespaces for different guests
   Run on host kernel
   Userland can be different from host
   Examples: OpenVZ, FreeVPS, Linux-Vserver
 Paravirtualisation
 Emulation
   Examples: QEMU, PearPC

  Copyright © 2007 Qumranet, Inc. All rights reserved.
KVM: Architectures Supported

    S390
      IBM mainframes: a hypervisor is a must
      Included in 2.6.26
    IA-64
      Included in 2.6.26
    X86
      Included in 2.6.20
      KVM-lite: PV Linux guest on non-VTx / non-SVM host
      (proposed)
    PowerPC
      PV
      Architecture support for hypervisor
      Included in 2.6.26
3   Copyright © 2007 Qumranet, Inc. All rights reserved.
X86 Hardware Extensions

 'guest mode' in addition to user and kernel modes
 Raise a trap for all privileged instructions
 Virtualised registers
 Processor
    Intel-VTx (VMX)
    AMD-V (SVM)
 MM
   EPT (Intel)
   NPT (AMD)
 IO
      VT-d (Intel)
      IOMMU (AMD)


  Copyright © 2007 Qumranet, Inc. All rights reserved.
What's handled in the kernel?

     CPU virtualisation (special instructions)
     MMU virtualisation
     Local APIC, PIC, IOAPIC, PIT
     (guest) paravirtualised network and block device
     drivers
          virtio-net
          virtio-block
     (guest) paravirtualised kernel support code
          paravirt_ops
          MMU
     (guest) paravirtualised clock driver

5   Copyright © 2007 Qumranet, Inc. All rights reserved.
KVM Process Model




                task           task      guest             task   task   guest




                                                 kernel


6   Copyright © 2007 Qumranet, Inc. All rights reserved.
KVM Process Model (cont'd)

    Guests are scheduled as regular processes
    kill(1), top(1) work as expected
    Guest physical memory is mapped into the task's
    virtual memory space
    Virtual processors in one VM are threads




7    Copyright © 2007 Qumranet, Inc. All rights reserved.
KVM Execution Model
        Userspace                              Kernel               Guest


                ioctl()

                                              Switch to
                                              Guest Mode

    Heavyweight                              Lightweight Exit   Native Guest
    Exit                                                         Execution

                                              Kernel
                                              Exit Handler


            Userspace
            Exit Handler

8   Copyright © 2007 Qumranet, Inc. All rights reserved.
Flow Example: Memory
Access
    Guest accesses an unmapped memory location
    Hardware traps into kernel mode
    kvm walks the guest page table, determines guest
    physical address
    kvm performs guest physical -> host physical
    translation
    kvm installs shadow page table entry containing guest
    virtual -> host physical translation
    Processor restarts execution of faulting instruction




9    Copyright © 2007 Qumranet, Inc. All rights reserved.
Paravirtualisation

 Modifying guest OS for performance
 Virtio
     Common drivers for all hypervisors
     Hypervisor-specific backend
     KVM backend in qemu
     Faster performance
     Efficient block, net drivers
     Balloon
     lguest, KVM use it already
 PV DMA
     Pass through Ethernet devices
 paravirt_ops
  Copyright © 2007 Qumranet, Inc. All rights reserved.
Network Devices

 Fully virtualised device performance not great
    55 Mbps for RTL
    Lots of IO-exits per packet

 Decided to implement a modern e1000
   Advantages:
        All code in userspace (qemu)
        All existing drivers recognise device
   IRQ coalescing
   Only 2-3 IO-exits per packet
   Goes in excess of 800 Mbps




 Copyright © 2007 Qumranet, Inc. All rights reserved.
Virtio Net

 Shared memory between host and guest
 Two queues: recv and send
 Ring buffer within each queue
 'available' pointer controlled by guest
 'used' pointer controlled by host




  Copyright © 2007 Qumranet, Inc. All rights reserved.
Virtio-net on KVM


                        BLK               NET
                                                          User-
                             Virtio PCI                   space
                            Guest kernel


                                                 QEMU
                                Shared
                                Memory

                                                  Linux




 Copyright © 2007 Qumranet, Inc. All rights reserved.
Ideas

 Shared memory between host and guest via virtio-
 pci
 Shared directory between host and guest using
 virtio + fuse
 VMGL (OpenGL for Virtual Machines) support
 http://kvm.qumranet.com/kvmwiki/TODO




 Copyright © 2007 Qumranet, Inc. All rights reserved.
KVM Pros

 Leverages Linux scheduler, memory management, I/O
 No scheduler involvement for I/O
 Full virtualisation: No changes to the guest necessary
   Paravirt drivers available for better performance
 Uses existing Linux security model
   can run VM as ordinary user
 Uses existing management tools
 Power management
 Guest memory swapping
 Real-time scheduling, NUMA
 Leverages Linux development momentum: all new
 drivers, {cpu, disk} schedulers, file systems, etc
 supported Qumranet, Inc. All rights reserved.
  Copyright © 2007
Distro / Industry interest

 libvirt
    Managing various guests under a hypervisor
    Support for Xen, KVM
    APIs between UI, middle layer and virtualisation backend
 Distributions
    Debian
    Ubuntu
    RedHat EL
    SLES
 Qumranet
    Dekstop Virtualisation


  Copyright © 2007 Qumranet, Inc. All rights reserved.
Release Philosophy

 Development snapshots every 1-2 weeks
    Release early and often
    Features introduces quickly
    Bugs fixed quickly
    Bugs added quickly
    Allows developers and users to track and test the latest
    and greatest
 Stable releases part of Linux 2.6.x
    With bugfixes going into Linux 2.6.x.y




 Copyright © 2007 Qumranet, Inc. All rights reserved.
Journey

  Linux 2.6.20 (4 Feb 2007): Initial release
  Linux 2.6.21 (25 Apr 2007): Stability,
  suspend/resume
  Linux 2.6.22 (8 Jul 2007): Stable ABI
    Old userspace, new kernel
    New userspace, old kernel
 Linux 2.6.23 (9 Oct 2007): SMP, performance
 Linux 2.6.24 (24 Jan 2008): In-kernel APIC,
 preemptibility, virtio
 Linux 2.6.25 (16 Apr 2008): Guest swapping,
 paravirt_ops, balloon drv
 Linux 2.6.26 (soon): PowerPC, s390, IA64, NPT,
 Copyright © 2007 Qumranet, Inc. All rights reserved. ...
 EPT, more paravirt (mmu),
KVM is Developer-friendly

   No need to reboot (usually)
   Netconsole, oprofile, all the tools work
   Small codebase
   Friendly community




  Copyright © 2007 Qumranet, Inc. All rights reserved.
Future

 Consolidate various virtualisation solutions existing in
 the kernel
    Started with move to virt/ from drivers/kvm/
 More hardware features support
 More paravirtualisation support
 Improve guest scaling
 Better support for management layers like libvirt
 Intel Real Mode Emulation




  Copyright © 2007 Qumranet, Inc. All rights reserved.
Do Read

 virt/*, arch/[x86|ia64|s390|powerpc]/kvm/*
 KvmForum2007 wiki page on
 http://kvm.qumranet.com
 kvm@vger.kernel.org
 virtualization@lists.osdl.org




  Copyright © 2007 Qumranet, Inc. All rights reserved.
Thank You

Más contenido relacionado

La actualidad más candente

KVM tools and enterprise usage
KVM tools and enterprise usageKVM tools and enterprise usage
KVM tools and enterprise usagevincentvdk
 
VMware Tutorial For Beginners | VMware Workstation | VMware Virtualization | ...
VMware Tutorial For Beginners | VMware Workstation | VMware Virtualization | ...VMware Tutorial For Beginners | VMware Workstation | VMware Virtualization | ...
VMware Tutorial For Beginners | VMware Workstation | VMware Virtualization | ...Edureka!
 
Virtualization Vs. Containers
Virtualization Vs. ContainersVirtualization Vs. Containers
Virtualization Vs. Containersactualtechmedia
 
Deep dive into Kubernetes Networking
Deep dive into Kubernetes NetworkingDeep dive into Kubernetes Networking
Deep dive into Kubernetes NetworkingSreenivas Makam
 
vSphere7 with Tanzu
vSphere7 with Tanzu vSphere7 with Tanzu
vSphere7 with Tanzu VMware Tanzu
 
Kvm virtualization platform
Kvm virtualization platformKvm virtualization platform
Kvm virtualization platformAhmad Hafeezi
 
Virtualization Technology Overview
Virtualization Technology OverviewVirtualization Technology Overview
Virtualization Technology OverviewOpenCity Community
 
Kubernetes - A Comprehensive Overview
Kubernetes - A Comprehensive OverviewKubernetes - A Comprehensive Overview
Kubernetes - A Comprehensive OverviewBob Killen
 
Docker and the Linux Kernel
Docker and the Linux KernelDocker and the Linux Kernel
Docker and the Linux KernelDocker, Inc.
 
Cloud Native Application
Cloud Native ApplicationCloud Native Application
Cloud Native ApplicationVMUG IT
 
virtualization-vs-containerization-paas
virtualization-vs-containerization-paasvirtualization-vs-containerization-paas
virtualization-vs-containerization-paasrajdeep
 
Volume Encryption In CloudStack
Volume Encryption In CloudStackVolume Encryption In CloudStack
Volume Encryption In CloudStackShapeBlue
 
Introduction to Kubernetes Workshop
Introduction to Kubernetes WorkshopIntroduction to Kubernetes Workshop
Introduction to Kubernetes WorkshopBob Killen
 
Hybrid cloud overview and VCF on VxRAIL
Hybrid cloud overview and VCF on VxRAILHybrid cloud overview and VCF on VxRAIL
Hybrid cloud overview and VCF on VxRAILDavid Pasek
 
VMware vSphere 6.0 - Troubleshooting Training - Day 5
VMware vSphere 6.0 - Troubleshooting Training - Day 5VMware vSphere 6.0 - Troubleshooting Training - Day 5
VMware vSphere 6.0 - Troubleshooting Training - Day 5Sanjeev Kumar
 
Deploying your first application with Kubernetes
Deploying your first application with KubernetesDeploying your first application with Kubernetes
Deploying your first application with KubernetesOVHcloud
 

La actualidad más candente (20)

KVM tools and enterprise usage
KVM tools and enterprise usageKVM tools and enterprise usage
KVM tools and enterprise usage
 
VMware Tutorial For Beginners | VMware Workstation | VMware Virtualization | ...
VMware Tutorial For Beginners | VMware Workstation | VMware Virtualization | ...VMware Tutorial For Beginners | VMware Workstation | VMware Virtualization | ...
VMware Tutorial For Beginners | VMware Workstation | VMware Virtualization | ...
 
Virtualization Vs. Containers
Virtualization Vs. ContainersVirtualization Vs. Containers
Virtualization Vs. Containers
 
Kubernetes Basics
Kubernetes BasicsKubernetes Basics
Kubernetes Basics
 
Deep dive into Kubernetes Networking
Deep dive into Kubernetes NetworkingDeep dive into Kubernetes Networking
Deep dive into Kubernetes Networking
 
vSphere7 with Tanzu
vSphere7 with Tanzu vSphere7 with Tanzu
vSphere7 with Tanzu
 
Kvm virtualization platform
Kvm virtualization platformKvm virtualization platform
Kvm virtualization platform
 
Virtualization Technology Overview
Virtualization Technology OverviewVirtualization Technology Overview
Virtualization Technology Overview
 
Kubernetes - A Comprehensive Overview
Kubernetes - A Comprehensive OverviewKubernetes - A Comprehensive Overview
Kubernetes - A Comprehensive Overview
 
Docker and the Linux Kernel
Docker and the Linux KernelDocker and the Linux Kernel
Docker and the Linux Kernel
 
Kubernetes PPT.pptx
Kubernetes PPT.pptxKubernetes PPT.pptx
Kubernetes PPT.pptx
 
Cloud Native Application
Cloud Native ApplicationCloud Native Application
Cloud Native Application
 
virtualization-vs-containerization-paas
virtualization-vs-containerization-paasvirtualization-vs-containerization-paas
virtualization-vs-containerization-paas
 
Volume Encryption In CloudStack
Volume Encryption In CloudStackVolume Encryption In CloudStack
Volume Encryption In CloudStack
 
Introduction to Kubernetes Workshop
Introduction to Kubernetes WorkshopIntroduction to Kubernetes Workshop
Introduction to Kubernetes Workshop
 
Hypervisors
HypervisorsHypervisors
Hypervisors
 
Hybrid cloud overview and VCF on VxRAIL
Hybrid cloud overview and VCF on VxRAILHybrid cloud overview and VCF on VxRAIL
Hybrid cloud overview and VCF on VxRAIL
 
VMware vSphere 6.0 - Troubleshooting Training - Day 5
VMware vSphere 6.0 - Troubleshooting Training - Day 5VMware vSphere 6.0 - Troubleshooting Training - Day 5
VMware vSphere 6.0 - Troubleshooting Training - Day 5
 
Kvm
KvmKvm
Kvm
 
Deploying your first application with Kubernetes
Deploying your first application with KubernetesDeploying your first application with Kubernetes
Deploying your first application with Kubernetes
 

Similar a The kvm virtualization 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...Jim St. Leger
 
Virtualization concept slideshare
Virtualization concept slideshareVirtualization concept slideshare
Virtualization concept slideshareYogesh Kumar
 
Linux container & docker
Linux container & dockerLinux container & docker
Linux container & dockerejlp12
 
Virtualization Primer for Java Developers
Virtualization Primer for Java DevelopersVirtualization Primer for Java Developers
Virtualization Primer for Java DevelopersRichard McDougall
 
Virtualization technolegys for amdocs
Virtualization technolegys for amdocsVirtualization technolegys for amdocs
Virtualization technolegys for amdocsSamuel Dratwa
 
Linux virtualization
Linux virtualizationLinux virtualization
Linux virtualizationGoogle
 
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
 
Technical update KVM and Red Hat Enterprise Virtualization (RHEV) by syedmshaaf
Technical update KVM and Red Hat Enterprise Virtualization (RHEV) by syedmshaafTechnical update KVM and Red Hat Enterprise Virtualization (RHEV) by syedmshaaf
Technical update KVM and Red Hat Enterprise Virtualization (RHEV) by syedmshaafSyed Shaaf
 
open source virtualization
open source virtualizationopen source virtualization
open source virtualizationKris Buytaert
 
Xen Euro Par07
Xen Euro Par07Xen Euro Par07
Xen Euro Par07congvc
 
Xen and Client Virtualization: the case of XenClient XT
Xen and Client Virtualization: the case of XenClient XTXen and Client Virtualization: the case of XenClient XT
Xen and Client Virtualization: the case of XenClient XTThe Linux Foundation
 
virtualization and hypervisors
virtualization and hypervisorsvirtualization and hypervisors
virtualization and hypervisorsGaurav Suri
 
CIF16/Scale14x: The latest from the Xen Project (Lars Kurth, Chairman of Xen ...
CIF16/Scale14x: The latest from the Xen Project (Lars Kurth, Chairman of Xen ...CIF16/Scale14x: The latest from the Xen Project (Lars Kurth, Chairman of Xen ...
CIF16/Scale14x: The latest from the Xen Project (Lars Kurth, Chairman of Xen ...The Linux Foundation
 
Xen Project Update LinuxCon Brazil
Xen Project Update LinuxCon BrazilXen Project Update LinuxCon Brazil
Xen Project Update LinuxCon BrazilThe Linux Foundation
 
Hyper V And Scvmm Best Practis
Hyper V And Scvmm Best PractisHyper V And Scvmm Best Practis
Hyper V And Scvmm Best PractisBlauge
 

Similar a The kvm virtualization way (20)

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...
 
Virtualization concept slideshare
Virtualization concept slideshareVirtualization concept slideshare
Virtualization concept slideshare
 
Linux container & docker
Linux container & dockerLinux container & docker
Linux container & docker
 
Virtualization Primer for Java Developers
Virtualization Primer for Java DevelopersVirtualization Primer for Java Developers
Virtualization Primer for Java Developers
 
Virtualization technolegys for amdocs
Virtualization technolegys for amdocsVirtualization technolegys for amdocs
Virtualization technolegys for amdocs
 
Linux virtualization
Linux virtualizationLinux virtualization
Linux virtualization
 
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
 
Technical update KVM and Red Hat Enterprise Virtualization (RHEV) by syedmshaaf
Technical update KVM and Red Hat Enterprise Virtualization (RHEV) by syedmshaafTechnical update KVM and Red Hat Enterprise Virtualization (RHEV) by syedmshaaf
Technical update KVM and Red Hat Enterprise Virtualization (RHEV) by syedmshaaf
 
Drive into kvm
Drive into kvmDrive into kvm
Drive into kvm
 
open source virtualization
open source virtualizationopen source virtualization
open source virtualization
 
Xen Euro Par07
Xen Euro Par07Xen Euro Par07
Xen Euro Par07
 
Xen and Client Virtualization: the case of XenClient XT
Xen and Client Virtualization: the case of XenClient XTXen and Client Virtualization: the case of XenClient XT
Xen and Client Virtualization: the case of XenClient XT
 
virtualization and hypervisors
virtualization and hypervisorsvirtualization and hypervisors
virtualization and hypervisors
 
VirtFS
VirtFSVirtFS
VirtFS
 
5 kvm arm
5 kvm arm5 kvm arm
5 kvm arm
 
CIF16/Scale14x: The latest from the Xen Project (Lars Kurth, Chairman of Xen ...
CIF16/Scale14x: The latest from the Xen Project (Lars Kurth, Chairman of Xen ...CIF16/Scale14x: The latest from the Xen Project (Lars Kurth, Chairman of Xen ...
CIF16/Scale14x: The latest from the Xen Project (Lars Kurth, Chairman of Xen ...
 
Kvm setup
Kvm setupKvm setup
Kvm setup
 
Xen Project Update LinuxCon Brazil
Xen Project Update LinuxCon BrazilXen Project Update LinuxCon Brazil
Xen Project Update LinuxCon Brazil
 
Hyper V And Scvmm Best Practis
Hyper V And Scvmm Best PractisHyper V And Scvmm Best Practis
Hyper V And Scvmm Best Practis
 

Más de Francisco Gonçalves

O que é o SecondLife? Sabia que este pode catalisar a colaboração na sua empr...
O que é o SecondLife? Sabia que este pode catalisar a colaboração na sua empr...O que é o SecondLife? Sabia que este pode catalisar a colaboração na sua empr...
O que é o SecondLife? Sabia que este pode catalisar a colaboração na sua empr...Francisco Gonçalves
 
20140128 webinar-get-more-out-of-mysql-with-tokudb-140319063324-phpapp02
20140128 webinar-get-more-out-of-mysql-with-tokudb-140319063324-phpapp0220140128 webinar-get-more-out-of-mysql-with-tokudb-140319063324-phpapp02
20140128 webinar-get-more-out-of-mysql-with-tokudb-140319063324-phpapp02Francisco Gonçalves
 
A automatização e virtualização do seu negócio
A automatização e virtualização do seu negócioA automatização e virtualização do seu negócio
A automatização e virtualização do seu negócioFrancisco Gonçalves
 
O rad da wave maker developing for the cloud
O rad da wave maker developing for the cloudO rad da wave maker developing for the cloud
O rad da wave maker developing for the cloudFrancisco Gonçalves
 
Scale out database apps através de galera cluster e maria db
Scale out database apps através de galera cluster e maria dbScale out database apps através de galera cluster e maria db
Scale out database apps através de galera cluster e maria dbFrancisco Gonçalves
 
Re pensando-virtualização-através-linux containers
Re pensando-virtualização-através-linux containersRe pensando-virtualização-através-linux containers
Re pensando-virtualização-através-linux containersFrancisco Gonçalves
 
O docker vai mudar tudo na sua infra estrutura-ti
O docker vai mudar tudo na sua infra estrutura-tiO docker vai mudar tudo na sua infra estrutura-ti
O docker vai mudar tudo na sua infra estrutura-tiFrancisco Gonçalves
 
Hypervisor "versus" Linux Containers with Docker !
Hypervisor "versus" Linux Containers with Docker !Hypervisor "versus" Linux Containers with Docker !
Hypervisor "versus" Linux Containers with Docker !Francisco Gonçalves
 
MariaDB Galera Cluster presentation
MariaDB Galera Cluster presentationMariaDB Galera Cluster presentation
MariaDB Galera Cluster presentationFrancisco Gonçalves
 
Wavemaker RAD for the Cloud with CloudJee - Future Direction 2014
Wavemaker RAD for the Cloud with CloudJee - Future Direction 2014Wavemaker RAD for the Cloud with CloudJee - Future Direction 2014
Wavemaker RAD for the Cloud with CloudJee - Future Direction 2014Francisco Gonçalves
 

Más de Francisco Gonçalves (20)

Ulteo virtual desktop system
Ulteo virtual desktop systemUlteo virtual desktop system
Ulteo virtual desktop system
 
O que é o SecondLife? Sabia que este pode catalisar a colaboração na sua empr...
O que é o SecondLife? Sabia que este pode catalisar a colaboração na sua empr...O que é o SecondLife? Sabia que este pode catalisar a colaboração na sua empr...
O que é o SecondLife? Sabia que este pode catalisar a colaboração na sua empr...
 
Porque a-burocracia-deve-morrer
Porque a-burocracia-deve-morrerPorque a-burocracia-deve-morrer
Porque a-burocracia-deve-morrer
 
20140128 webinar-get-more-out-of-mysql-with-tokudb-140319063324-phpapp02
20140128 webinar-get-more-out-of-mysql-with-tokudb-140319063324-phpapp0220140128 webinar-get-more-out-of-mysql-with-tokudb-140319063324-phpapp02
20140128 webinar-get-more-out-of-mysql-with-tokudb-140319063324-phpapp02
 
A automatização e virtualização do seu negócio
A automatização e virtualização do seu negócioA automatização e virtualização do seu negócio
A automatização e virtualização do seu negócio
 
O rad da wave maker developing for the cloud
O rad da wave maker developing for the cloudO rad da wave maker developing for the cloud
O rad da wave maker developing for the cloud
 
Scale out database apps através de galera cluster e maria db
Scale out database apps através de galera cluster e maria dbScale out database apps através de galera cluster e maria db
Scale out database apps através de galera cluster e maria db
 
Re pensando-virtualização-através-linux containers
Re pensando-virtualização-através-linux containersRe pensando-virtualização-através-linux containers
Re pensando-virtualização-através-linux containers
 
O docker vai mudar tudo na sua infra estrutura-ti
O docker vai mudar tudo na sua infra estrutura-tiO docker vai mudar tudo na sua infra estrutura-ti
O docker vai mudar tudo na sua infra estrutura-ti
 
Teamwork Web Application
Teamwork Web ApplicationTeamwork Web Application
Teamwork Web Application
 
Node Js
Node JsNode Js
Node Js
 
Hypervisor "versus" Linux Containers with Docker !
Hypervisor "versus" Linux Containers with Docker !Hypervisor "versus" Linux Containers with Docker !
Hypervisor "versus" Linux Containers with Docker !
 
MariaDB Galera Cluster presentation
MariaDB Galera Cluster presentationMariaDB Galera Cluster presentation
MariaDB Galera Cluster presentation
 
Linux capacity planning
Linux capacity planningLinux capacity planning
Linux capacity planning
 
Wavemaker RAD for the Cloud with CloudJee - Future Direction 2014
Wavemaker RAD for the Cloud with CloudJee - Future Direction 2014Wavemaker RAD for the Cloud with CloudJee - Future Direction 2014
Wavemaker RAD for the Cloud with CloudJee - Future Direction 2014
 
Juju on ubuntu cloud
Juju on ubuntu cloudJuju on ubuntu cloud
Juju on ubuntu cloud
 
Cloud foundry and openstackcloud
Cloud foundry and openstackcloudCloud foundry and openstackcloud
Cloud foundry and openstackcloud
 
Ubuntu cloud infrastructures
Ubuntu cloud infrastructuresUbuntu cloud infrastructures
Ubuntu cloud infrastructures
 
Openstack deployment-with ubuntu
Openstack deployment-with ubuntuOpenstack deployment-with ubuntu
Openstack deployment-with ubuntu
 
Desk top virtual_gbanif
Desk top virtual_gbanifDesk top virtual_gbanif
Desk top virtual_gbanif
 

Último

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024The Digital Insurer
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024The Digital Insurer
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamUiPathCommunity
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Victor Rentea
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsNanddeep Nachan
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistandanishmna97
 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfOverkill Security
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...apidays
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfOrbitshub
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKJago de Vreede
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Angeliki Cooney
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 

Último (20)

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdf
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 

The kvm virtualization way

  • 1. KVM: Virtualisation The Linux Way Amit Shah amit.shah@qumranet.com GEEP
  • 2. Virtualisation Strategies “Native” Hypervisors Have a runtime Need a “primary” guest OS Examples: Xen, VMWare ESX Server, IBM mainframes Containers Different namespaces for different guests Run on host kernel Userland can be different from host Examples: OpenVZ, FreeVPS, Linux-Vserver Paravirtualisation Emulation Examples: QEMU, PearPC Copyright © 2007 Qumranet, Inc. All rights reserved.
  • 3. KVM: Architectures Supported S390 IBM mainframes: a hypervisor is a must Included in 2.6.26 IA-64 Included in 2.6.26 X86 Included in 2.6.20 KVM-lite: PV Linux guest on non-VTx / non-SVM host (proposed) PowerPC PV Architecture support for hypervisor Included in 2.6.26 3 Copyright © 2007 Qumranet, Inc. All rights reserved.
  • 4. X86 Hardware Extensions 'guest mode' in addition to user and kernel modes Raise a trap for all privileged instructions Virtualised registers Processor Intel-VTx (VMX) AMD-V (SVM) MM EPT (Intel) NPT (AMD) IO VT-d (Intel) IOMMU (AMD) Copyright © 2007 Qumranet, Inc. All rights reserved.
  • 5. What's handled in the kernel? CPU virtualisation (special instructions) MMU virtualisation Local APIC, PIC, IOAPIC, PIT (guest) paravirtualised network and block device drivers virtio-net virtio-block (guest) paravirtualised kernel support code paravirt_ops MMU (guest) paravirtualised clock driver 5 Copyright © 2007 Qumranet, Inc. All rights reserved.
  • 6. KVM Process Model task task guest task task guest kernel 6 Copyright © 2007 Qumranet, Inc. All rights reserved.
  • 7. KVM Process Model (cont'd) Guests are scheduled as regular processes kill(1), top(1) work as expected Guest physical memory is mapped into the task's virtual memory space Virtual processors in one VM are threads 7 Copyright © 2007 Qumranet, Inc. All rights reserved.
  • 8. KVM Execution Model Userspace Kernel Guest ioctl() Switch to Guest Mode Heavyweight Lightweight Exit Native Guest Exit Execution Kernel Exit Handler Userspace Exit Handler 8 Copyright © 2007 Qumranet, Inc. All rights reserved.
  • 9. Flow Example: Memory Access Guest accesses an unmapped memory location Hardware traps into kernel mode kvm walks the guest page table, determines guest physical address kvm performs guest physical -> host physical translation kvm installs shadow page table entry containing guest virtual -> host physical translation Processor restarts execution of faulting instruction 9 Copyright © 2007 Qumranet, Inc. All rights reserved.
  • 10. Paravirtualisation Modifying guest OS for performance Virtio Common drivers for all hypervisors Hypervisor-specific backend KVM backend in qemu Faster performance Efficient block, net drivers Balloon lguest, KVM use it already PV DMA Pass through Ethernet devices paravirt_ops Copyright © 2007 Qumranet, Inc. All rights reserved.
  • 11. Network Devices Fully virtualised device performance not great 55 Mbps for RTL Lots of IO-exits per packet Decided to implement a modern e1000 Advantages: All code in userspace (qemu) All existing drivers recognise device IRQ coalescing Only 2-3 IO-exits per packet Goes in excess of 800 Mbps Copyright © 2007 Qumranet, Inc. All rights reserved.
  • 12. Virtio Net Shared memory between host and guest Two queues: recv and send Ring buffer within each queue 'available' pointer controlled by guest 'used' pointer controlled by host Copyright © 2007 Qumranet, Inc. All rights reserved.
  • 13. Virtio-net on KVM BLK NET User- Virtio PCI space Guest kernel QEMU Shared Memory Linux Copyright © 2007 Qumranet, Inc. All rights reserved.
  • 14. Ideas Shared memory between host and guest via virtio- pci Shared directory between host and guest using virtio + fuse VMGL (OpenGL for Virtual Machines) support http://kvm.qumranet.com/kvmwiki/TODO Copyright © 2007 Qumranet, Inc. All rights reserved.
  • 15. KVM Pros Leverages Linux scheduler, memory management, I/O No scheduler involvement for I/O Full virtualisation: No changes to the guest necessary Paravirt drivers available for better performance Uses existing Linux security model can run VM as ordinary user Uses existing management tools Power management Guest memory swapping Real-time scheduling, NUMA Leverages Linux development momentum: all new drivers, {cpu, disk} schedulers, file systems, etc supported Qumranet, Inc. All rights reserved. Copyright © 2007
  • 16. Distro / Industry interest libvirt Managing various guests under a hypervisor Support for Xen, KVM APIs between UI, middle layer and virtualisation backend Distributions Debian Ubuntu RedHat EL SLES Qumranet Dekstop Virtualisation Copyright © 2007 Qumranet, Inc. All rights reserved.
  • 17. Release Philosophy Development snapshots every 1-2 weeks Release early and often Features introduces quickly Bugs fixed quickly Bugs added quickly Allows developers and users to track and test the latest and greatest Stable releases part of Linux 2.6.x With bugfixes going into Linux 2.6.x.y Copyright © 2007 Qumranet, Inc. All rights reserved.
  • 18. Journey Linux 2.6.20 (4 Feb 2007): Initial release Linux 2.6.21 (25 Apr 2007): Stability, suspend/resume Linux 2.6.22 (8 Jul 2007): Stable ABI Old userspace, new kernel New userspace, old kernel Linux 2.6.23 (9 Oct 2007): SMP, performance Linux 2.6.24 (24 Jan 2008): In-kernel APIC, preemptibility, virtio Linux 2.6.25 (16 Apr 2008): Guest swapping, paravirt_ops, balloon drv Linux 2.6.26 (soon): PowerPC, s390, IA64, NPT, Copyright © 2007 Qumranet, Inc. All rights reserved. ... EPT, more paravirt (mmu),
  • 19. KVM is Developer-friendly No need to reboot (usually) Netconsole, oprofile, all the tools work Small codebase Friendly community Copyright © 2007 Qumranet, Inc. All rights reserved.
  • 20. Future Consolidate various virtualisation solutions existing in the kernel Started with move to virt/ from drivers/kvm/ More hardware features support More paravirtualisation support Improve guest scaling Better support for management layers like libvirt Intel Real Mode Emulation Copyright © 2007 Qumranet, Inc. All rights reserved.
  • 21. Do Read virt/*, arch/[x86|ia64|s390|powerpc]/kvm/* KvmForum2007 wiki page on http://kvm.qumranet.com kvm@vger.kernel.org virtualization@lists.osdl.org Copyright © 2007 Qumranet, Inc. All rights reserved.