SlideShare a Scribd company logo
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

More Related Content

What's hot

VNF Integration and Support in CloudStack - Wei Zhou - ShapeBlue
VNF Integration and Support in CloudStack - Wei Zhou - ShapeBlueVNF Integration and Support in CloudStack - Wei Zhou - ShapeBlue
VNF Integration and Support in CloudStack - Wei Zhou - ShapeBlue
ShapeBlue
 
Kubernetes Concepts And Architecture Powerpoint Presentation Slides
Kubernetes Concepts And Architecture Powerpoint Presentation SlidesKubernetes Concepts And Architecture Powerpoint Presentation Slides
Kubernetes Concepts And Architecture Powerpoint Presentation Slides
SlideTeam
 
Kubernetes for Beginners: An Introductory Guide
Kubernetes for Beginners: An Introductory GuideKubernetes for Beginners: An Introductory Guide
Kubernetes for Beginners: An Introductory Guide
Bytemark
 
Docker, Linux Containers (LXC), and security
Docker, Linux Containers (LXC), and securityDocker, Linux Containers (LXC), and security
Docker, Linux Containers (LXC), and security
Jérôme Petazzoni
 
Kubernetes Architecture | Understanding Kubernetes Components | Kubernetes Tu...
Kubernetes Architecture | Understanding Kubernetes Components | Kubernetes Tu...Kubernetes Architecture | Understanding Kubernetes Components | Kubernetes Tu...
Kubernetes Architecture | Understanding Kubernetes Components | Kubernetes Tu...
Edureka!
 
Kubernetes Networking
Kubernetes NetworkingKubernetes Networking
Kubernetes Networking
CJ Cullen
 
Etude de la virtualisation
Etude de la virtualisationEtude de la virtualisation
Etude de la virtualisation
Antoine Benkemoun
 
[오픈소스컨설팅] Open Stack Ceph, Neutron, HA, Multi-Region
[오픈소스컨설팅] Open Stack Ceph, Neutron, HA, Multi-Region[오픈소스컨설팅] Open Stack Ceph, Neutron, HA, Multi-Region
[오픈소스컨설팅] Open Stack Ceph, Neutron, HA, Multi-Region
Ji-Woong Choi
 
Kvm
KvmKvm
OpenShift-Technical-Overview.pdf
OpenShift-Technical-Overview.pdfOpenShift-Technical-Overview.pdf
OpenShift-Technical-Overview.pdf
JuanSalinas593459
 
Kubernetes - introduction
Kubernetes - introductionKubernetes - introduction
Kubernetes - introduction
Sparkbit
 
Kubernetes Architecture and Introduction
Kubernetes Architecture and IntroductionKubernetes Architecture and Introduction
Kubernetes Architecture and Introduction
Stefan Schimanski
 
Kubernetes presentation
Kubernetes presentationKubernetes presentation
Kubernetes presentation
GauranG Bajpai
 
Red Hat OpenShift Container Platform Overview
Red Hat OpenShift Container Platform OverviewRed Hat OpenShift Container Platform Overview
Red Hat OpenShift Container Platform Overview
James Falkner
 
Kubernetes Introduction
Kubernetes IntroductionKubernetes Introduction
Kubernetes Introduction
Martin Danielsson
 
virtualization (Hyper-V)
virtualization (Hyper-V)virtualization (Hyper-V)
virtualization (Hyper-V)
Mohamed Hesham
 
Kubernetes Workshop
Kubernetes WorkshopKubernetes Workshop
Kubernetes Workshop
loodse
 
An Introduction to Kubernetes
An Introduction to KubernetesAn Introduction to Kubernetes
An Introduction to Kubernetes
Imesh Gunaratne
 
Kubernetes 101
Kubernetes 101Kubernetes 101
Kubernetes 101
Crevise Technologies
 
[오픈소스컨설팅] 쿠버네티스와 쿠버네티스 on 오픈스택 비교 및 구축 방법
[오픈소스컨설팅] 쿠버네티스와 쿠버네티스 on 오픈스택 비교  및 구축 방법[오픈소스컨설팅] 쿠버네티스와 쿠버네티스 on 오픈스택 비교  및 구축 방법
[오픈소스컨설팅] 쿠버네티스와 쿠버네티스 on 오픈스택 비교 및 구축 방법
Open Source Consulting
 

What's hot (20)

VNF Integration and Support in CloudStack - Wei Zhou - ShapeBlue
VNF Integration and Support in CloudStack - Wei Zhou - ShapeBlueVNF Integration and Support in CloudStack - Wei Zhou - ShapeBlue
VNF Integration and Support in CloudStack - Wei Zhou - ShapeBlue
 
Kubernetes Concepts And Architecture Powerpoint Presentation Slides
Kubernetes Concepts And Architecture Powerpoint Presentation SlidesKubernetes Concepts And Architecture Powerpoint Presentation Slides
Kubernetes Concepts And Architecture Powerpoint Presentation Slides
 
Kubernetes for Beginners: An Introductory Guide
Kubernetes for Beginners: An Introductory GuideKubernetes for Beginners: An Introductory Guide
Kubernetes for Beginners: An Introductory Guide
 
Docker, Linux Containers (LXC), and security
Docker, Linux Containers (LXC), and securityDocker, Linux Containers (LXC), and security
Docker, Linux Containers (LXC), and security
 
Kubernetes Architecture | Understanding Kubernetes Components | Kubernetes Tu...
Kubernetes Architecture | Understanding Kubernetes Components | Kubernetes Tu...Kubernetes Architecture | Understanding Kubernetes Components | Kubernetes Tu...
Kubernetes Architecture | Understanding Kubernetes Components | Kubernetes Tu...
 
Kubernetes Networking
Kubernetes NetworkingKubernetes Networking
Kubernetes Networking
 
Etude de la virtualisation
Etude de la virtualisationEtude de la virtualisation
Etude de la virtualisation
 
[오픈소스컨설팅] Open Stack Ceph, Neutron, HA, Multi-Region
[오픈소스컨설팅] Open Stack Ceph, Neutron, HA, Multi-Region[오픈소스컨설팅] Open Stack Ceph, Neutron, HA, Multi-Region
[오픈소스컨설팅] Open Stack Ceph, Neutron, HA, Multi-Region
 
Kvm
KvmKvm
Kvm
 
OpenShift-Technical-Overview.pdf
OpenShift-Technical-Overview.pdfOpenShift-Technical-Overview.pdf
OpenShift-Technical-Overview.pdf
 
Kubernetes - introduction
Kubernetes - introductionKubernetes - introduction
Kubernetes - introduction
 
Kubernetes Architecture and Introduction
Kubernetes Architecture and IntroductionKubernetes Architecture and Introduction
Kubernetes Architecture and Introduction
 
Kubernetes presentation
Kubernetes presentationKubernetes presentation
Kubernetes presentation
 
Red Hat OpenShift Container Platform Overview
Red Hat OpenShift Container Platform OverviewRed Hat OpenShift Container Platform Overview
Red Hat OpenShift Container Platform Overview
 
Kubernetes Introduction
Kubernetes IntroductionKubernetes Introduction
Kubernetes Introduction
 
virtualization (Hyper-V)
virtualization (Hyper-V)virtualization (Hyper-V)
virtualization (Hyper-V)
 
Kubernetes Workshop
Kubernetes WorkshopKubernetes Workshop
Kubernetes Workshop
 
An Introduction to Kubernetes
An Introduction to KubernetesAn Introduction to Kubernetes
An Introduction to Kubernetes
 
Kubernetes 101
Kubernetes 101Kubernetes 101
Kubernetes 101
 
[오픈소스컨설팅] 쿠버네티스와 쿠버네티스 on 오픈스택 비교 및 구축 방법
[오픈소스컨설팅] 쿠버네티스와 쿠버네티스 on 오픈스택 비교  및 구축 방법[오픈소스컨설팅] 쿠버네티스와 쿠버네티스 on 오픈스택 비교  및 구축 방법
[오픈소스컨설팅] 쿠버네티스와 쿠버네티스 on 오픈스택 비교 및 구축 방법
 

Similar to 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 slideshare
Yogesh Kumar
 
Linux container & docker
Linux container & dockerLinux container & docker
Linux container & docker
ejlp12
 
Virtualization Primer for Java Developers
Virtualization Primer for Java DevelopersVirtualization Primer for Java Developers
Virtualization Primer for Java Developers
Richard McDougall
 
Virtualization technolegys for amdocs
Virtualization technolegys for amdocsVirtualization technolegys for amdocs
Virtualization technolegys for amdocs
Samuel Dratwa
 
Linux virtualization
Linux virtualizationLinux virtualization
Linux virtualization
Google
 
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 syedmshaaf
Syed Shaaf
 
Drive into kvm
Drive into kvmDrive into kvm
Drive into kvm
Udayendu Kar
 
open source virtualization
open source virtualizationopen source virtualization
open source virtualization
Kris 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 XT
The Linux Foundation
 
virtualization and hypervisors
virtualization and hypervisorsvirtualization and hypervisors
virtualization and hypervisorsGaurav Suri
 
VirtFS
VirtFSVirtFS
5 kvm arm
5 kvm arm5 kvm arm
5 kvm arm
sundarms
 
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
 
Kvm setup
Kvm setupKvm setup
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 Practis
Blauge
 

Similar to 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
 

More from Francisco Gonçalves

Ulteo virtual desktop system
Ulteo virtual desktop systemUlteo virtual desktop system
Ulteo virtual desktop system
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
 
Porque a-burocracia-deve-morrer
Porque a-burocracia-deve-morrerPorque a-burocracia-deve-morrer
Porque a-burocracia-deve-morrer
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-phpapp02
Francisco 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ócio
Francisco 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
 
Teamwork Web Application
Teamwork Web ApplicationTeamwork Web Application
Teamwork Web Application
Francisco Gonçalves
 
Node Js
Node JsNode 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 !
Francisco Gonçalves
 
MariaDB Galera Cluster presentation
MariaDB Galera Cluster presentationMariaDB Galera Cluster presentation
MariaDB Galera Cluster presentation
Francisco Gonçalves
 
Linux capacity planning
Linux capacity planningLinux capacity planning
Linux capacity planning
Francisco 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
 

More from 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
 

Recently uploaded

LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
The Metaverse and AI: how can decision-makers harness the Metaverse for their...
The Metaverse and AI: how can decision-makers harness the Metaverse for their...The Metaverse and AI: how can decision-makers harness the Metaverse for their...
The Metaverse and AI: how can decision-makers harness the Metaverse for their...
Jen Stirrup
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance
 
Assure Contact Center Experiences for Your Customers With ThousandEyes
Assure Contact Center Experiences for Your Customers With ThousandEyesAssure Contact Center Experiences for Your Customers With ThousandEyes
Assure Contact Center Experiences for Your Customers With ThousandEyes
ThousandEyes
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 
UiPath Community Day Dubai: AI at Work..
UiPath Community Day Dubai: AI at Work..UiPath Community Day Dubai: AI at Work..
UiPath Community Day Dubai: AI at Work..
UiPathCommunity
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
Aftab Hussain
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
Quantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIsQuantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIs
Vlad Stirbu
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
mikeeftimakis1
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
BookNet Canada
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
Ralf Eggert
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
Alpen-Adria-Universität
 
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptxSecstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
nkrafacyberclub
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
UiPathCommunity
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
Dorra BARTAGUIZ
 

Recently uploaded (20)

LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
The Metaverse and AI: how can decision-makers harness the Metaverse for their...
The Metaverse and AI: how can decision-makers harness the Metaverse for their...The Metaverse and AI: how can decision-makers harness the Metaverse for their...
The Metaverse and AI: how can decision-makers harness the Metaverse for their...
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
 
Assure Contact Center Experiences for Your Customers With ThousandEyes
Assure Contact Center Experiences for Your Customers With ThousandEyesAssure Contact Center Experiences for Your Customers With ThousandEyes
Assure Contact Center Experiences for Your Customers With ThousandEyes
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 
UiPath Community Day Dubai: AI at Work..
UiPath Community Day Dubai: AI at Work..UiPath Community Day Dubai: AI at Work..
UiPath Community Day Dubai: AI at Work..
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
Quantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIsQuantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIs
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
 
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptxSecstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
 

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.