【问题标题】:openstack always dispatch instance to the lesser remains resource hypervisor but not the most remainsopenstack 总是将实例分派到较少的资源管理程序,但不是最多的资源
【发布时间】:2021-09-25 13:15:34
【问题描述】:

Openstack 三个节点的集群(node-30, node-31, node-32),新实例总是不会调度到最剩余的资源节点

创建一个具有 4 个 vcpus 和 8G 内存的新实例,始终分派到node-30

没有特别的filter_scheduler 也没有特别的placement-api 的配置:

# cat nova_scheduler/nova.conf
[DEFAULT]
debug = False
...

[filter_scheduler]

[api]
use_forwarded_for = true

[scheduler]
max_attempts = 10
discover_hosts_in_cells_interval = -1

[placement]
auth_type = password
...

相关日志:


问题:

1,为什么nova-scheduler总是将实例分派给较少资源的hypervisor,而不是大部分资源的hypervisor?

2,是否有任何错误的配置,我该如何解决?

【问题讨论】:

    标签: openstack dispatch placement nova-scheduler


    【解决方案1】:

    1,主要原因可能是nova-schedulerplacement-api配置有错误,但我们使用默认配置,我无法弄清楚。

    2,我发现默认内存会以 1.5 的比例过度使用,这样就有机会将实例分派给具有负值free_ram_mb 的管理程序。

    从此文件检查nova-stable-train/doc/source/admin/configuration/schedulers.rst

    Prior to the 19.0.0 Stein release, if left unset, the ``cpu_allocation_ratio``
    defaults to 16.0, the ``ram_allocation_ratio`` defaults to 1.5, and the
    ``disk_allocation_ratio`` defaults to 1.0.
    
    Starting with the 19.0.0 Stein release, the following configuration options
    control the initial allocation ratio values for a compute node:
    
    * :oslo.config:option:`initial_cpu_allocation_ratio`: the initial VCPU
      inventory allocation ratio for a new compute node record, defaults to 16.0
    * :oslo.config:option:`initial_ram_allocation_ratio`: the initial MEMORY_MB
      inventory allocation ratio for a new compute node record, defaults to 1.5
    * :oslo.config:option:`initial_disk_allocation_ratio`: the initial DISK_GB
      inventory allocation ratio for a new compute node record, defaults to 1.0
    

    该文件中还有一些常见的 Usage scenarios 用于调整比率。

    在我的场景中,我们设置了reserved_host_memory_mb = 102400ram_allocation_ratio = 1.0 防止内存过度使用,并且它可以工作。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-12-12
      • 1970-01-01
      • 2023-03-18
      • 2016-11-18
      相关资源
      最近更新 更多