SlideShare a Scribd company logo
1 of 11
OPENSTACK NOVA AND KVM
OPTIMISATION
Kavit Munshi, CTO, Aptira
OPENSTACK NOVA


Nova is the project name for OpenStack Compute, a cloud computing fabric
controller, the main part of an IaaS system. Individuals and organizations can
use Nova to host and manage their own cloud computing systems.




Key components of the compute part of OpenStack are

• Nova
• Cinder
• Glance

These are also the weakest points of an OpenStack deployment and suffer the
most from performance hits.
COMPUTE PERFORMANCE BOTTLENECKS


Compute nodes run the actual virtual instances that power an IaaS solution.
These run Hypervisors to share resources between the instances. The
performance of the hypervisor can be affected by.

• I/O : All instances use local file system to host filesystems. Scarce resources as
  more instances are run per server by increasing cores. First to be hit.

• Memory/RAM: Second factor to be hit after disks. Most VMs use RAM more
  extensively than CPU. With increasing cores and larger VMs RAM contention
  becomes a problem

• CPU: Usually the last to be hit. Not as much of a problem any more because of
  Hyper threading and multiple cores.
NOVA CONFIGURATION TO AVOID BOTTLENECKS


Admins can take several precautions in the way Nova is configured to ensure
optimal performance of the hypervisor


• Flavours: Only allow sensible flavours for the users. Example on a compute
  node with 8 CPU cores and 96 GB ram avoid creating a flavour that uses 1
  vCPU and 64 GB RAM

• Quotas: Used to limit the number of resources used by a particular tenant:
  number of instances, block volume number and space, or number of
  snaphsots and images kept in Glance. Consider the potential number of
  tenants and available hardware.

• Overprovisioning: Use technologies like thin provisioning, hyper threading
  to over provision resources but have to be careful about performance hits.
CHOICE OF HYPERVISOR

Many kinds of hypervisors are supported by Nova. The most popular ones are:

•   KVM
•   Xen
•   Hyper-V
•   VMWare ESXi




    For the purpose of this talk we are going to assume that we will be using KVM.
    It is the most popular and the best supported hypervisor on Nova.

    KVM has also have a great improvement in performance in the recent times.
    KVM is also best suited to run Linux machines.
OPTIMISING KVM




List of KVM settings that can improve guest performance:

• Kernel I/O scheduler to “Deadline”. Default is cfq, good enough for most work
  loads but for over povisioning use “deadline”
• Huge pages enabled
• Kernel same-page merging enabled (KSM)
• Hyper threading turned on
• Place guest file systems directly on hypervisor block devices instead of in files.



For optimising running instances use the following drivers
• Virtio_net (Network driver)
• Virtio_blk (block device driver)
PERFORMANCE IMPROVEMENT WITH DEADLINE SCHEDULER
HUGE PAGES



A page, memory page, or virtual page is a fixed-length contiguous block of virtual
memory, and it is the smallest unit of data for the following:
• memory allocation performed by the operating system for a program; and
• transfer between main memory and any other auxiliary store, such as a hard
   disk drive.

On x86_64 architecture standard page size is 4kb. A huge page is 4MB and a
large page is 1 GB.

There are couple of important benefits of HugePages:
• Page size is set 2MB instead of 4KB
• Memory used by HugePages is locked and cannot be swapped.

Huge Pages can also be enabled INSIDE running instances for best performance.
KERNEL SAME-PAGE MERGING


KSM lets the hypervisor system share identical memory pages amongst different
processes or virtualized guests.

The ksmtuned process work in the following way:

•   scans through the memory finding duplicate pages
•   Merges duplicate page to single page
•   Map to all virtual machine locations
•   Set copy on write
•   Separate page when individual guests write to it.

KSM is critical to performance if you want to over provision your resources
successfully.
SOURCES

This presentation was created from the following sources. Please read them to
better understand the concepts

http://www.linux-kvm.org/wiki/images/5/59/Kvm-forum-2011-performance-
improvements-optimizations-D.pdf

http://www.mirantis.com/blog/making-most-of-openstack-compute-
performance/

http://publib.boulder.ibm.com/infocenter/lnxinfo/v3r0m0/index.jsp?topic=%2Flia
at%2Fliaatbpperfmods.htm

http://www.linux-kvm.com/content/using-ksm-kernel-samepage-merging-kvm

http://www.pythian.com/news/1326/performance-tuning-hugepages-in-linux/

http://www.linux-kvm.org/wiki/images/9/9e/2010-forum-thp.pdf
THE END




Questions?

More Related Content

Viewers also liked

Graduation Thesis - Art in digital games
Graduation Thesis - Art in digital gamesGraduation Thesis - Art in digital games
Graduation Thesis - Art in digital gamesMartin Honisek
 
Hyper-V OpenStack Nova Compute
Hyper-V OpenStack Nova ComputeHyper-V OpenStack Nova Compute
Hyper-V OpenStack Nova ComputeAlessandro Pilotti
 
VMware vSphere in an OpenStack Environment
VMware vSphere in an OpenStack EnvironmentVMware vSphere in an OpenStack Environment
VMware vSphere in an OpenStack EnvironmentScott Lowe
 
VMware Nova Compute Driver
VMware Nova Compute DriverVMware Nova Compute Driver
VMware Nova Compute DriverSean Chen
 
VMware compute driver for OpenStack
VMware compute driver for OpenStackVMware compute driver for OpenStack
VMware compute driver for OpenStackopenstackindia
 
Open stack glance
Open stack glanceOpen stack glance
Open stack glance宛儒 余
 
KVM tools and enterprise usage
KVM tools and enterprise usageKVM tools and enterprise usage
KVM tools and enterprise usagevincentvdk
 
MAASとJujuでつくるOpenStack環境構築入門 IceHouse対応版 - OpenStack最新情報セミナー 2014年10月
MAASとJujuでつくるOpenStack環境構築入門 IceHouse対応版 - OpenStack最新情報セミナー 2014年10月MAASとJujuでつくるOpenStack環境構築入門 IceHouse対応版 - OpenStack最新情報セミナー 2014年10月
MAASとJujuでつくるOpenStack環境構築入門 IceHouse対応版 - OpenStack最新情報セミナー 2014年10月VirtualTech Japan Inc.
 
VMWare: Nova and NVP Support - Gary Kotton and Dimitri Desmidt
VMWare: Nova and NVP Support - Gary Kotton and Dimitri DesmidtVMWare: Nova and NVP Support - Gary Kotton and Dimitri Desmidt
VMWare: Nova and NVP Support - Gary Kotton and Dimitri DesmidtCloud Native Day Tel Aviv
 
Openstack study-nova-02
Openstack study-nova-02Openstack study-nova-02
Openstack study-nova-02Jinho Shin
 
BrocadeのOpenStack連携ソリューション
BrocadeのOpenStack連携ソリューションBrocadeのOpenStack連携ソリューション
BrocadeのOpenStack連携ソリューションBrocade
 
OpenStack QuickStart - Icehouse
OpenStack QuickStart - IcehouseOpenStack QuickStart - Icehouse
OpenStack QuickStart - IcehouseHideki Saito
 

Viewers also liked (17)

Graduation Thesis - Art in digital games
Graduation Thesis - Art in digital gamesGraduation Thesis - Art in digital games
Graduation Thesis - Art in digital games
 
Hyper-V OpenStack Nova Compute
Hyper-V OpenStack Nova ComputeHyper-V OpenStack Nova Compute
Hyper-V OpenStack Nova Compute
 
VMware vSphere in an OpenStack Environment
VMware vSphere in an OpenStack EnvironmentVMware vSphere in an OpenStack Environment
VMware vSphere in an OpenStack Environment
 
VMware Nova Compute Driver
VMware Nova Compute DriverVMware Nova Compute Driver
VMware Nova Compute Driver
 
Top 10 Ways to Mess Up Your Distributed System
Top 10 Ways to Mess Up Your Distributed SystemTop 10 Ways to Mess Up Your Distributed System
Top 10 Ways to Mess Up Your Distributed System
 
VMware compute driver for OpenStack
VMware compute driver for OpenStackVMware compute driver for OpenStack
VMware compute driver for OpenStack
 
Open stack glance
Open stack glanceOpen stack glance
Open stack glance
 
KVM tools and enterprise usage
KVM tools and enterprise usageKVM tools and enterprise usage
KVM tools and enterprise usage
 
MAASとJujuでつくるOpenStack環境構築入門 IceHouse対応版 - OpenStack最新情報セミナー 2014年10月
MAASとJujuでつくるOpenStack環境構築入門 IceHouse対応版 - OpenStack最新情報セミナー 2014年10月MAASとJujuでつくるOpenStack環境構築入門 IceHouse対応版 - OpenStack最新情報セミナー 2014年10月
MAASとJujuでつくるOpenStack環境構築入門 IceHouse対応版 - OpenStack最新情報セミナー 2014年10月
 
KVM & OpenStack
KVM & OpenStackKVM & OpenStack
KVM & OpenStack
 
VMWare: Nova and NVP Support - Gary Kotton and Dimitri Desmidt
VMWare: Nova and NVP Support - Gary Kotton and Dimitri DesmidtVMWare: Nova and NVP Support - Gary Kotton and Dimitri Desmidt
VMWare: Nova and NVP Support - Gary Kotton and Dimitri Desmidt
 
Openstack study-nova-02
Openstack study-nova-02Openstack study-nova-02
Openstack study-nova-02
 
OpenStack Glance
OpenStack GlanceOpenStack Glance
OpenStack Glance
 
OpenStack Glance
OpenStack GlanceOpenStack Glance
OpenStack Glance
 
BrocadeのOpenStack連携ソリューション
BrocadeのOpenStack連携ソリューションBrocadeのOpenStack連携ソリューション
BrocadeのOpenStack連携ソリューション
 
OpenStack QuickStart - Icehouse
OpenStack QuickStart - IcehouseOpenStack QuickStart - Icehouse
OpenStack QuickStart - Icehouse
 
Cat @ scale
Cat @ scaleCat @ scale
Cat @ scale
 

More from openstackindia

Guts & OpenStack migration
Guts & OpenStack migrationGuts & OpenStack migration
Guts & OpenStack migrationopenstackindia
 
Copr HD OpenStack Day India
Copr HD OpenStack Day IndiaCopr HD OpenStack Day India
Copr HD OpenStack Day Indiaopenstackindia
 
Your first patch to OpenStack
Your first patch to OpenStackYour first patch to OpenStack
Your first patch to OpenStackopenstackindia
 
OpenStack Neutron Behind The Senes
OpenStack Neutron Behind The SenesOpenStack Neutron Behind The Senes
OpenStack Neutron Behind The Senesopenstackindia
 
OpenStack Storage Buddy Ceph
OpenStack Storage Buddy CephOpenStack Storage Buddy Ceph
OpenStack Storage Buddy Cephopenstackindia
 
State of Containers in OpenStack
State of Containers in OpenStackState of Containers in OpenStack
State of Containers in OpenStackopenstackindia
 
The OpenStack Contribution Workflow
The OpenStack Contribution WorkflowThe OpenStack Contribution Workflow
The OpenStack Contribution Workflowopenstackindia
 
Introduction to Cinder
Introduction to CinderIntroduction to Cinder
Introduction to Cinderopenstackindia
 
OpenStack NFV Edge computing for IOT microservices
OpenStack NFV Edge computing for IOT microservicesOpenStack NFV Edge computing for IOT microservices
OpenStack NFV Edge computing for IOT microservicesopenstackindia
 
OpenStack Tempest and REST API testing
OpenStack Tempest and REST API testingOpenStack Tempest and REST API testing
OpenStack Tempest and REST API testingopenstackindia
 
Deploying openstack using ansible
Deploying openstack using ansibleDeploying openstack using ansible
Deploying openstack using ansibleopenstackindia
 
Ceph openstack-jun-2015-meetup
Ceph openstack-jun-2015-meetupCeph openstack-jun-2015-meetup
Ceph openstack-jun-2015-meetupopenstackindia
 
Role of sdn controllers in open stack
Role of sdn controllers in open stackRole of sdn controllers in open stack
Role of sdn controllers in open stackopenstackindia
 
Outreachy with-openstack-zaqar
Outreachy with-openstack-zaqarOutreachy with-openstack-zaqar
Outreachy with-openstack-zaqaropenstackindia
 
Enhancing OpenStack FWaaS for real world application
Enhancing OpenStack FWaaS for real world applicationEnhancing OpenStack FWaaS for real world application
Enhancing OpenStack FWaaS for real world applicationopenstackindia
 
Openstack devops challenges
Openstack devops challenges Openstack devops challenges
Openstack devops challenges openstackindia
 
Demistifying open stack storage
Demistifying open stack storageDemistifying open stack storage
Demistifying open stack storageopenstackindia
 

More from openstackindia (20)

Guts & OpenStack migration
Guts & OpenStack migrationGuts & OpenStack migration
Guts & OpenStack migration
 
Copr HD OpenStack Day India
Copr HD OpenStack Day IndiaCopr HD OpenStack Day India
Copr HD OpenStack Day India
 
OPNFV & OpenStack
OPNFV & OpenStackOPNFV & OpenStack
OPNFV & OpenStack
 
Your first patch to OpenStack
Your first patch to OpenStackYour first patch to OpenStack
Your first patch to OpenStack
 
OpenStack Neutron Behind The Senes
OpenStack Neutron Behind The SenesOpenStack Neutron Behind The Senes
OpenStack Neutron Behind The Senes
 
OpenStack Storage Buddy Ceph
OpenStack Storage Buddy CephOpenStack Storage Buddy Ceph
OpenStack Storage Buddy Ceph
 
OpenStack Watcher
OpenStack WatcherOpenStack Watcher
OpenStack Watcher
 
State of Containers in OpenStack
State of Containers in OpenStackState of Containers in OpenStack
State of Containers in OpenStack
 
The OpenStack Contribution Workflow
The OpenStack Contribution WorkflowThe OpenStack Contribution Workflow
The OpenStack Contribution Workflow
 
Introduction to Cinder
Introduction to CinderIntroduction to Cinder
Introduction to Cinder
 
OpenStack NFV Edge computing for IOT microservices
OpenStack NFV Edge computing for IOT microservicesOpenStack NFV Edge computing for IOT microservices
OpenStack NFV Edge computing for IOT microservices
 
OpenStack Tempest and REST API testing
OpenStack Tempest and REST API testingOpenStack Tempest and REST API testing
OpenStack Tempest and REST API testing
 
Deploying openstack using ansible
Deploying openstack using ansibleDeploying openstack using ansible
Deploying openstack using ansible
 
Ceph openstack-jun-2015-meetup
Ceph openstack-jun-2015-meetupCeph openstack-jun-2015-meetup
Ceph openstack-jun-2015-meetup
 
Role of sdn controllers in open stack
Role of sdn controllers in open stackRole of sdn controllers in open stack
Role of sdn controllers in open stack
 
Outreachy with-openstack-zaqar
Outreachy with-openstack-zaqarOutreachy with-openstack-zaqar
Outreachy with-openstack-zaqar
 
Enhancing OpenStack FWaaS for real world application
Enhancing OpenStack FWaaS for real world applicationEnhancing OpenStack FWaaS for real world application
Enhancing OpenStack FWaaS for real world application
 
Openstack devops challenges
Openstack devops challenges Openstack devops challenges
Openstack devops challenges
 
Demistifying open stack storage
Demistifying open stack storageDemistifying open stack storage
Demistifying open stack storage
 
OpenStack Heat
OpenStack HeatOpenStack Heat
OpenStack Heat
 

OpenStack nova and kvm optimisation

  • 1. OPENSTACK NOVA AND KVM OPTIMISATION Kavit Munshi, CTO, Aptira
  • 2. OPENSTACK NOVA Nova is the project name for OpenStack Compute, a cloud computing fabric controller, the main part of an IaaS system. Individuals and organizations can use Nova to host and manage their own cloud computing systems. Key components of the compute part of OpenStack are • Nova • Cinder • Glance These are also the weakest points of an OpenStack deployment and suffer the most from performance hits.
  • 3. COMPUTE PERFORMANCE BOTTLENECKS Compute nodes run the actual virtual instances that power an IaaS solution. These run Hypervisors to share resources between the instances. The performance of the hypervisor can be affected by. • I/O : All instances use local file system to host filesystems. Scarce resources as more instances are run per server by increasing cores. First to be hit. • Memory/RAM: Second factor to be hit after disks. Most VMs use RAM more extensively than CPU. With increasing cores and larger VMs RAM contention becomes a problem • CPU: Usually the last to be hit. Not as much of a problem any more because of Hyper threading and multiple cores.
  • 4. NOVA CONFIGURATION TO AVOID BOTTLENECKS Admins can take several precautions in the way Nova is configured to ensure optimal performance of the hypervisor • Flavours: Only allow sensible flavours for the users. Example on a compute node with 8 CPU cores and 96 GB ram avoid creating a flavour that uses 1 vCPU and 64 GB RAM • Quotas: Used to limit the number of resources used by a particular tenant: number of instances, block volume number and space, or number of snaphsots and images kept in Glance. Consider the potential number of tenants and available hardware. • Overprovisioning: Use technologies like thin provisioning, hyper threading to over provision resources but have to be careful about performance hits.
  • 5. CHOICE OF HYPERVISOR Many kinds of hypervisors are supported by Nova. The most popular ones are: • KVM • Xen • Hyper-V • VMWare ESXi For the purpose of this talk we are going to assume that we will be using KVM. It is the most popular and the best supported hypervisor on Nova. KVM has also have a great improvement in performance in the recent times. KVM is also best suited to run Linux machines.
  • 6. OPTIMISING KVM List of KVM settings that can improve guest performance: • Kernel I/O scheduler to “Deadline”. Default is cfq, good enough for most work loads but for over povisioning use “deadline” • Huge pages enabled • Kernel same-page merging enabled (KSM) • Hyper threading turned on • Place guest file systems directly on hypervisor block devices instead of in files. For optimising running instances use the following drivers • Virtio_net (Network driver) • Virtio_blk (block device driver)
  • 7. PERFORMANCE IMPROVEMENT WITH DEADLINE SCHEDULER
  • 8. HUGE PAGES A page, memory page, or virtual page is a fixed-length contiguous block of virtual memory, and it is the smallest unit of data for the following: • memory allocation performed by the operating system for a program; and • transfer between main memory and any other auxiliary store, such as a hard disk drive. On x86_64 architecture standard page size is 4kb. A huge page is 4MB and a large page is 1 GB. There are couple of important benefits of HugePages: • Page size is set 2MB instead of 4KB • Memory used by HugePages is locked and cannot be swapped. Huge Pages can also be enabled INSIDE running instances for best performance.
  • 9. KERNEL SAME-PAGE MERGING KSM lets the hypervisor system share identical memory pages amongst different processes or virtualized guests. The ksmtuned process work in the following way: • scans through the memory finding duplicate pages • Merges duplicate page to single page • Map to all virtual machine locations • Set copy on write • Separate page when individual guests write to it. KSM is critical to performance if you want to over provision your resources successfully.
  • 10. SOURCES This presentation was created from the following sources. Please read them to better understand the concepts http://www.linux-kvm.org/wiki/images/5/59/Kvm-forum-2011-performance- improvements-optimizations-D.pdf http://www.mirantis.com/blog/making-most-of-openstack-compute- performance/ http://publib.boulder.ibm.com/infocenter/lnxinfo/v3r0m0/index.jsp?topic=%2Flia at%2Fliaatbpperfmods.htm http://www.linux-kvm.com/content/using-ksm-kernel-samepage-merging-kvm http://www.pythian.com/news/1326/performance-tuning-hugepages-in-linux/ http://www.linux-kvm.org/wiki/images/9/9e/2010-forum-thp.pdf