Over-Commit values for the Host Aggregates

Overcommitting is the process of allocating more virtualized CPUs or memory than there are physical resources on the system. CPU overcommit allows under-utilized virtualized servers or desktops to run on fewer servers which saves power and money.

Most operating systems and applications do not use 100% of the available RAM all the time. This behavior can be exploited with KVM to use more memory for guests than what is physically available.

Virtualized CPUs are overcommitted best when each guest only has a single VCPU. The Linux scheduler is very efficient with this type of load. KVM should safely support guests with loads under 100% at a ratio of five VCPUs. Overcommitting single VCPU guests is not an issue.

In openstack, over-committ value is a global configuration which is defined in the /etc/nova/nova.conf. Which mean, it will be applied for all of your compute nodes in the cluster. This document describes, how you can set it up for different types of compute nodes.

  • Scenario.

I have 4 compute nodes, I would like to classify it “Generic’ and “I/O Optimized” I want to set different CPU_ALLOCATION_RATIO and RAM_ALLOCATION_RATIO for them, let see how we can do this.

  • Make sure the following Filters added in the /etc/nova/nova.conf Of Controllers

scheduler_default_filters=AggregateInstanceExtraSepcsFilter,AvailabilityZoneFilter

root@node-182:~# nova hypervisor-list
+—-+—————————–+
| ID | Hypervisor hostname |
+—-+—————————–+
| 1  | node-163.stackbees.local |
| 4  | node-176.stackbees.local |
| 7  | node-178.stackbees.local |
| 10 | node-177.stackbees.local |
+—-+—————————–+

  • Create Two host Aggregates Under a single zone NOVA

nova aggregate-create Generic NOVA
nova aggregate-create Optmizied NOVA

root@node-148:~# nova aggregate-list
+—-+———————+——————-+
| Id | Name                | Availability Zone |
+—-+———————+——————-+
| 4  | Generic   | NOVA    |
| 13 | Optmizied | NOVA    |
+—-+———————+——————-+

  • Adding the Meta Data

nova aggregate-set-metadata 4 host_type=general
nova aggregate-set-metadata 13 host_type=optimized

  • Adding Hosts to the Aggregates

nova aggregate-add-host 4 node-163.stackbees.local
nova aggregate-add-host 4 node-176.stackbees.local
nova aggregate-add-host 13 node-177.stackbees.local
nova aggregate-add-host 13 node-178.stackbees.local

  • Now Setting Cover-Commit Value for  each aggregates

nova aggregate-set-metadata 4 cpu_allocation_ratio=8
nova aggregate-set-metadata 4 ram_allocation_ratio=1
nova aggregate-set-metadat 13 cpu_allocation_ratio=16
nova aggregate-set-metadata 13 ram_allocation_ratio=1.5

stacker has written 18 articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Humans Only. * Time limit is exhausted. Please reload the CAPTCHA.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>