summaryrefslogtreecommitdiff
path: root/nova/conf
diff options
context:
space:
mode:
authorIlya Popov <ilya_p@hotmail.com>2021-08-23 16:44:25 +0300
committerIlya Popov <ilya_p@hotmail.com>2022-02-08 10:46:28 +0300
commitd13412648d011994a146dac1e7214ead3b82b31b (patch)
tree333d42e680e51da8fa0b20e3622245e99679efc0 /nova/conf
parentb6fe7521afa8d42febc68f5f79782f7bcc3b568f (diff)
downloadnova-d13412648d011994a146dac1e7214ead3b82b31b.tar.gz
Fix to implement 'pack' or 'spread' VM's NUMA cells
Cells mean NUMA cells below in text. By default, first instance's cell are placed to the host's cell with id 0, so it will be exhausted first. Than host's cell with id 1 will be used and exhausted. It will lead to error placing instance with number of cells in NUMA topology equal to host's cells number if some instances with one cell topology are placed on cell with id 0 before. Fix will perform several sorts to put less used cells at the beginning of host_cells list based on PCI devices, memory and cpu usage when packing_host_numa_cells_allocation_strategy is set to False (so called 'spread strategy'), or will try to place all VM's cell to the same host's cell untill it will be completely exhausted and only after will start to use next available host's cell (so called 'pack strategy'), when the configuration option packing_host_numa_cells_allocation_strategy is set to True. Partial-Bug: #1940668 Change-Id: I03c4db3c36a780aac19841b750ff59acd3572ec6
Diffstat (limited to 'nova/conf')
-rw-r--r--nova/conf/compute.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/nova/conf/compute.py b/nova/conf/compute.py
index 5cf8c31714..263d777586 100644
--- a/nova/conf/compute.py
+++ b/nova/conf/compute.py
@@ -1008,6 +1008,23 @@ Related options:
filtering computes based on supported image types, which is required
to be enabled for this to take effect.
"""),
+ cfg.BoolOpt('packing_host_numa_cells_allocation_strategy',
+ default=True,
+ help="""
+This option controls allocation strategy used to choose NUMA cells on host for
+placing VM's NUMA cells (for VMs with defined numa topology). By
+default host's NUMA cell with more resources consumed will be chosen first for
+placing attempt. So the host cell with some usage will be packed with VM's cell
+until it will be completely exhausted, before new free host's cell will be
+used. When the packing_host_numa_cells_allocation_strategy variable is set to
+``False``, host's NUMA cell with more resources available will be used.
+
+Possible values:
+
+* ``True``: Packing VM's NUMA cell on most used host NUMA cell.
+* ``False``: Spreading VM's NUMA cell on host's NUMA cells with more resources
+ available.
+"""),
]
interval_opts = [