0

OpenStack Xena CentOS 8 Stream

My task is to increase from 16 vCPU to 32 vCPU. I'm trying to overcommit, but it doesn't work.

I have one controller and one compute. Compute output:

[root@controller ~(keystone)]# openstack hypervisor stats show
+----------------------+-------+
| field | value |
+----------------------+-------+
| count | 1 |
| current_workload | 0 |
| disk_available_least | 62 |
| free_disk_gb | 69 |
| free_ram_mb | 31326 |
| local_gb | 69 |
| local_gb_used | 0 |
| memory_mb | 31838 |
| memory_mb_used | 512 |
| running_vms | 0 |
| vcpus | 16 |
| vcpus_used | 0 |
+----------------------+-------+

On compute in /etc/nova/nova.conf by default:

# Virtual CPU to physical CPU allocation ratio. For more information, refer to
# the documentation. (floating point value)
# Minimum value: 0.0
#cpu_allocation_ratio=<None>

I did this: cpu_allocation_ratio=2.0, then systemctl restart openstack-nova-compute. After that I did openstack hypervisor stats show again and saw that 16 vCPUs were still available.

/etc/nova/nova.conf also has an option:

#
# Initial virtual CPU to physical CPU allocation ratio. For more information,
# refer to the documentation. (floating point value)
# Minimum value: 0.0
#initial_cpu_allocation_ratio=16.0

I tried setting initial_cpu_allocation_ratio=32.0, but that didn't help either.

In addition, I found only such documentation on overcommitting https://docs.openstack.org/arch-design/design-compute/design-compute-overcommit.html , but it does not say how to configure it correctly.

Maksim
  • 11
  • 3

1 Answers1

1

Check the allocation ratio:

openstack resource provider inventory list 4f35070b-df79-41d1-88e0-831e5f210497
    +----------------+------------------+----------+----------+----------+-----------+--------+--------+
    | resource_class | allocation_ratio | min_unit | max_unit | reserved | step_size |  total |   used |
    +----------------+------------------+----------+----------+----------+-----------+--------+--------+
    | VCPU           |             2.08 |        1 |      112 |        0 |         1 |    112 |    222 |
    | MEMORY_MB      |             1.18 |        1 |   515164 |     8192 |         1 | 515164 | 395264 |
    | DISK_GB        |             0.98 |        1 |     7150 |        0 |         1 |   7150 |   2985 |
    +----------------+------------------+----------+----------+----------+-----------+--------+--------+

If you need to get calculated values:

openstack allocation candidate list --resource MEMORY_MB=1 -f json -c "inventory used/capacity" -c "resource provider"
[
  {
    "resource provider": "4f35070b-df79-41d1-88e0-831e5f210497",
    "inventory used/capacity": "VCPU=222/232,MEMORY_MB=395264/598226,DISK_GB=2985/7007"
  }
]