From 915bf046ee3af5429237ed124713f876630b7ae7 Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Mon, 18 Jan 2021 21:01:02 +0900 Subject: [PATCH] Add some tunable parameters for nova-scheduler Since placement service was introduced, there have been several conditions where instances are not well distributed among multiple compute nodes. For example with the default configurations if a user creates multiple instances concurrently, these instances might be packed into a single compute node because placement returns the same results until any instance is actually launched at compute nodes. This change introdices two tunable parameters about nova-scheduler so that we can implement better distribution of nova instances in some usecases. Change-Id: Id488db4bd60b1c35704e24a0a85d61853bfd7038 --- deployment/nova/nova-scheduler-container-puppet.yaml | 12 ++++++++++++ .../nova-scheduler-tunables-8c1dbab10b289480.yaml | 8 ++++++++ 2 files changed, 20 insertions(+) create mode 100644 releasenotes/notes/nova-scheduler-tunables-8c1dbab10b289480.yaml diff --git a/deployment/nova/nova-scheduler-container-puppet.yaml b/deployment/nova/nova-scheduler-container-puppet.yaml index cc3c96fc47..9b6c9f68e8 100644 --- a/deployment/nova/nova-scheduler-container-puppet.yaml +++ b/deployment/nova/nova-scheduler-container-puppet.yaml @@ -118,6 +118,16 @@ parameters: aggregates to be reported in placement, so only hosts within the asked aggregates would be accepted. type: boolean + NovaSchedulerHostSubsetSize: + default: 1 + description: > + Size of subset of best hosts selected by scheduler. + type: number + NovaSchedulerShuffleBestSameWeighedHosts: + default: false + description: > + Enable spreading the instances between hosts with the same best weight. + type: boolean # DEPRECATED: the following options are deprecated and are currently maintained # for backwards compatibility. They will be removed in future release. NovaSchedulerDefaultFilters: @@ -206,6 +216,8 @@ outputs: - {get_param: NovaSchedulerDefaultFilters} - {get_param: NovaSchedulerEnabledFilters} nova::scheduler::filter::scheduler_max_attempts: {get_param: NovaSchedulerMaxAttempts} + nova::scheduler::filter::scheduler_host_subset_size: {get_param: NovaSchedulerHostSubsetSize} + nova::scheduler::filter::shuffle_best_same_weighed_hosts: {get_param: NovaSchedulerShuffleBestSameWeighedHosts} nova::scheduler::discover_hosts_in_cells_interval: {get_param: NovaSchedulerDiscoverHostsInCellsInterval} nova::scheduler::query_placement_for_image_type_support: {get_param: NovaSchedulerQueryImageType} nova::scheduler::limit_tenants_to_placement_aggregate: {get_param: NovaSchedulerLimitTenantsToPlacementAggregate} diff --git a/releasenotes/notes/nova-scheduler-tunables-8c1dbab10b289480.yaml b/releasenotes/notes/nova-scheduler-tunables-8c1dbab10b289480.yaml new file mode 100644 index 0000000000..f0dc41540d --- /dev/null +++ b/releasenotes/notes/nova-scheduler-tunables-8c1dbab10b289480.yaml @@ -0,0 +1,8 @@ +--- +features: + - | + Add the following parameters to tune the behavior of nova-scheduler to + achieve better distribution of instances. + + - ``NovaSchedulerHostSubsetSize`` + - ``NovaSchedulerShuffleBestSameWeighedHosts``