0

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

创建一个具有 4 个 vcpus 和 8G 内存的新实例,始终分派到node-30在此处输入图像描述

没有 specialfilter_scheduler也没有 specialplacement-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总是将instance分派到lesser resresource hypervisor而不是mostres resource hypervisor?

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

4

1 回答 1

0

nova-scheduler1、主要原因可能是or的配置有错误placement-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防止内存过度使用并且它可以工作。

于 2021-10-16T08:33:18.660 回答