Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

OpenStack nova and kvm optimisation


Published on

  • Be the first to comment

OpenStack nova and kvm optimisation

  2. 2. OPENSTACK NOVANova is the project name for OpenStack Compute, a cloud computing fabriccontroller, the main part of an IaaS system. Individuals and organizations canuse Nova to host and manage their own cloud computing systems.Key components of the compute part of OpenStack are• Nova• Cinder• GlanceThese are also the weakest points of an OpenStack deployment and suffer themost from performance hits.
  3. 3. COMPUTE PERFORMANCE BOTTLENECKSCompute nodes run the actual virtual instances that power an IaaS solution.These run Hypervisors to share resources between the instances. Theperformance 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. 4. NOVA CONFIGURATION TO AVOID BOTTLENECKSAdmins can take several precautions in the way Nova is configured to ensureoptimal 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. 5. CHOICE OF HYPERVISORMany 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. 6. OPTIMISING KVMList 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)
  8. 8. HUGE PAGESA page, memory page, or virtual page is a fixed-length contiguous block of virtualmemory, 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 alarge 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. 9. KERNEL SAME-PAGE MERGINGKSM lets the hypervisor system share identical memory pages amongst differentprocesses 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 resourcessuccessfully.
  10. 10. SOURCESThis presentation was created from the following sources. Please read them tobetter understand the concepts
  11. 11. THE ENDQuestions?