Overcommit ratio for virtual cpu, virtual memory and disk
Problem
The IBM® Cloud Infrastructure Center allows you to overcommit the CPU and RAM on compute nodes. This allows you to increase the number of instances running on your cloud, at the expense of reducing the performance of the instances. Refer to resource overcommit ratio for additional information.
Explanation
Assume the Compute service uses the following ratio (which is default ratio for z/VM®):
- CPU allocation ratio: 16.0:1
- RAM allocation ratio: 3.0:1
The default CPU allocation ratio of 16:1 means that the scheduler allocates up to 16 virtual cores per physical core. For example, if a physical node has 12 cores, the scheduler sees 192 available virtual cores. With typical flavor definitions of 4 virtual cores per instance, this ratio would provide 48 instances on a physical node.
Similarly, the default RAM allocation ratio of 3:1 means that the scheduler allocates instances to a physical node as long as the total amount of RAM associated with the instances is less than 3 times the amount of RAM available on the physical node.
Resolution
The overcommit ratio is per-compute node concept, you can update
the allocation on a specific compute node, edit
/etc/nova/nova.conf
on that compute
node for vcpu, memoryby editing
cpu_allocation_ratio,
ram_allocation_ratio
respectively.
and restart services on compute node:
/opt/ibm/icic/bin/icic-services restart
Example:
At the management node, run following command to retrieve the resource provider information.
# openstack resource provider list
+--------------------------------------+----------+------------+
| uuid | name | generation |
+--------------------------------------+----------+------------+
| b0c04c6c-54a6-4e82-bb50-df01b4930f67 | XXXX5404 | 62 |
| 763f12c3-0b96-48af-b2bd-4e87ebacb26e | XXXX5403 | 188 |
+--------------------------------------+----------+------------+
The memory overcommit ratio is
3.0
by default on z/VM.
# openstack resource provider inventory list 763f12c3-0b96-48af-b2bd-4e87ebacb26e
+----------------+------------------+----------+----------+----------+-----------+--------+
| resource_class | allocation_ratio | min_unit | max_unit | reserved | step_size | total |
+----------------+------------------+----------+----------+----------+-----------+--------+
| VCPU | 16.0 | 1 | 14 | 0 | 1 | 14 |
| MEMORY_MB | 3.0 | 1 | 577536 | 0 | 1 | 577536 |
| DISK_GB | 1.0 | 1 | 1356 | 0 | 1 | 1356 |
+----------------+------------------+----------+----------+----------+-----------+--------+
update
/etc/nova/nova.conf
by
updating
ram_allocation_ratio
to 4.0
and restart service, after a while, the overcommit ratio is
4.0
# openstack resource provider inventory list 763f12c3-0b96-48af-b2bd-4e87ebacb26e
+----------------+------------------+----------+----------+----------+-----------+--------+
| resource_class | allocation_ratio | min_unit | max_unit | reserved | step_size | total |
+----------------+------------------+----------+----------+----------+-----------+--------+
| VCPU | 16.0 | 1 | 14 | 0 | 1 | 14 |
| MEMORY_MB | 4.0 | 1 | 577536 | 0 | 1 | 577536 |
| DISK_GB | 1.0 | 1 | 1356 | 0 | 1 | 1356 |
+----------------+------------------+----------+----------+----------+-----------+--------+
#