summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean Mooney <work@seanmooney.info>2022-02-24 14:37:44 +0000
committerSean Mooney <work@seanmooney.info>2022-10-06 12:50:56 +0100
commit1260cdd49218f8bedf935190e2721422e5b5c6b6 (patch)
tree1f700fe5cb4f1f78341c966951132e7555295002
parentce15e7fa68081490b488b05baac78ff3e326f019 (diff)
downloadnova-1260cdd49218f8bedf935190e2721422e5b5c6b6.tar.gz
update default overcommit
This change updates the cpu and ram initial allocation ratios to 4.0 and 1.0 to reflect the typical values that are suitable for non web hosting workloads. Change-Id: I283eb270a4e47da15cf01d098b4f3952f7b5b570 implements: bp/nova-change-default-overcommit-values
-rw-r--r--doc/source/admin/scheduling.rst10
-rw-r--r--nova/conf/compute.py4
-rw-r--r--nova/tests/functional/test_server_group.py5
-rw-r--r--nova/tests/functional/test_servers_provider_tree.py4
-rw-r--r--nova/tests/unit/objects/test_compute_node.py12
-rw-r--r--nova/tests/unit/virt/libvirt/test_driver.py4
-rw-r--r--nova/tests/unit/virt/vmwareapi/test_driver_api.py4
-rw-r--r--releasenotes/notes/update-initial-allocation-defaults-94106033b66b8fa0.yaml21
8 files changed, 49 insertions, 15 deletions
diff --git a/doc/source/admin/scheduling.rst b/doc/source/admin/scheduling.rst
index e0e5b7188b..e863554fe7 100644
--- a/doc/source/admin/scheduling.rst
+++ b/doc/source/admin/scheduling.rst
@@ -1100,6 +1100,16 @@ control the initial allocation ratio values for a compute node:
* :oslo.config:option:`initial_disk_allocation_ratio` the initial DISK_GB
inventory allocation ratio for a new compute node record, defaults to 1.0
+Starting with the 27.0.0 Antelope release, the following default values are used
+for 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 4.0
+* :oslo.config:option:`initial_ram_allocation_ratio` the initial MEMORY_MB
+ inventory allocation ratio for a new compute node record, defaults to 1.0
+* :oslo.config:option:`initial_disk_allocation_ratio` the initial DISK_GB
+ inventory allocation ratio for a new compute node record, defaults to 1.0
+
Scheduling considerations
~~~~~~~~~~~~~~~~~~~~~~~~~
diff --git a/nova/conf/compute.py b/nova/conf/compute.py
index 71707cfd53..224c802935 100644
--- a/nova/conf/compute.py
+++ b/nova/conf/compute.py
@@ -529,7 +529,7 @@ Related options:
* ``initial_disk_allocation_ratio``
"""),
cfg.FloatOpt('initial_cpu_allocation_ratio',
- default=16.0,
+ default=4.0,
min=0.0,
help="""
Initial virtual CPU to physical CPU allocation ratio.
@@ -545,7 +545,7 @@ Related options:
* ``cpu_allocation_ratio``
"""),
cfg.FloatOpt('initial_ram_allocation_ratio',
- default=1.5,
+ default=1.0,
min=0.0,
help="""
Initial virtual RAM to physical RAM allocation ratio.
diff --git a/nova/tests/functional/test_server_group.py b/nova/tests/functional/test_server_group.py
index 38804a671b..7cbe8bdb67 100644
--- a/nova/tests/functional/test_server_group.py
+++ b/nova/tests/functional/test_server_group.py
@@ -103,7 +103,10 @@ class ServerGroupFakeDriver(fake.SmallFakeDriver):
"""
vcpus = 1000
- memory_mb = 8192
+ # the testcases were built with a default ram allocation ratio
+ # of 1.5 and 8192 mb of ram so to maintain the same capacity with
+ # the new default allocation ratio of 1.0 we use 8192+4096=12288
+ memory_mb = 12288
local_gb = 100000
diff --git a/nova/tests/functional/test_servers_provider_tree.py b/nova/tests/functional/test_servers_provider_tree.py
index f48f91dc02..da562c4f19 100644
--- a/nova/tests/functional/test_servers_provider_tree.py
+++ b/nova/tests/functional/test_servers_provider_tree.py
@@ -82,7 +82,7 @@ class ProviderTreeTests(integrated_helpers.ProviderUsageBaseTestCase):
},
'MEMORY_MB': {
'total': 8192,
- 'allocation_ratio': 1.5,
+ 'allocation_ratio': 1.0,
'max_unit': 8192,
'min_unit': 1,
'reserved': 512,
@@ -90,7 +90,7 @@ class ProviderTreeTests(integrated_helpers.ProviderUsageBaseTestCase):
},
'VCPU': {
'total': 10,
- 'allocation_ratio': 16.0,
+ 'allocation_ratio': 4.0,
'max_unit': 10,
'min_unit': 1,
'reserved': 0,
diff --git a/nova/tests/unit/objects/test_compute_node.py b/nova/tests/unit/objects/test_compute_node.py
index 1964117fd6..7e6894a1cc 100644
--- a/nova/tests/unit/objects/test_compute_node.py
+++ b/nova/tests/unit/objects/test_compute_node.py
@@ -666,8 +666,8 @@ class _TestComputeNodeObject(object):
CONF.initial_disk_allocation_ratio, compute.disk_allocation_ratio)
mock_update.assert_called_once_with(
- self.context, 123, {'cpu_allocation_ratio': 16.0,
- 'ram_allocation_ratio': 1.5,
+ self.context, 123, {'cpu_allocation_ratio': 4.0,
+ 'ram_allocation_ratio': 1.0,
'disk_allocation_ratio': 1.0})
@mock.patch('nova.db.main.api.compute_node_update')
@@ -694,8 +694,8 @@ class _TestComputeNodeObject(object):
CONF.initial_disk_allocation_ratio, compute.disk_allocation_ratio)
mock_update.assert_called_once_with(
- self.context, 123, {'cpu_allocation_ratio': 16.0,
- 'ram_allocation_ratio': 1.5,
+ self.context, 123, {'cpu_allocation_ratio': 4.0,
+ 'ram_allocation_ratio': 1.0,
'disk_allocation_ratio': 1.0})
@mock.patch('nova.db.main.api.compute_node_update')
@@ -722,8 +722,8 @@ class _TestComputeNodeObject(object):
CONF.initial_disk_allocation_ratio, compute.disk_allocation_ratio)
mock_update.assert_called_once_with(
- self.context, 123, {'cpu_allocation_ratio': 16.0,
- 'ram_allocation_ratio': 1.5,
+ self.context, 123, {'cpu_allocation_ratio': 4.0,
+ 'ram_allocation_ratio': 1.0,
'disk_allocation_ratio': 1.0})
def test_get_all_by_not_mapped(self):
diff --git a/nova/tests/unit/virt/libvirt/test_driver.py b/nova/tests/unit/virt/libvirt/test_driver.py
index 86e3661a34..fee87d3bb5 100644
--- a/nova/tests/unit/virt/libvirt/test_driver.py
+++ b/nova/tests/unit/virt/libvirt/test_driver.py
@@ -21366,7 +21366,7 @@ class TestUpdateProviderTree(test.NoDBTestCase):
'min_unit': 1,
'max_unit': self.vcpus,
'step_size': 1,
- 'allocation_ratio': 16.0,
+ 'allocation_ratio': 4.0,
'reserved': 0,
},
orc.PCPU: {
@@ -21382,7 +21382,7 @@ class TestUpdateProviderTree(test.NoDBTestCase):
'min_unit': 1,
'max_unit': self.memory_mb,
'step_size': 1,
- 'allocation_ratio': 1.5,
+ 'allocation_ratio': 1.0,
'reserved': 512,
},
orc.DISK_GB: {
diff --git a/nova/tests/unit/virt/vmwareapi/test_driver_api.py b/nova/tests/unit/virt/vmwareapi/test_driver_api.py
index e2a321b50b..ac473c8c09 100644
--- a/nova/tests/unit/virt/vmwareapi/test_driver_api.py
+++ b/nova/tests/unit/virt/vmwareapi/test_driver_api.py
@@ -2123,7 +2123,7 @@ class VMwareAPIVMTestCase(test.NoDBTestCase,
'min_unit': 1,
'max_unit': 16,
'step_size': 1,
- 'allocation_ratio': 16.0,
+ 'allocation_ratio': 4.0,
},
orc.MEMORY_MB: {
'total': 2048,
@@ -2131,7 +2131,7 @@ class VMwareAPIVMTestCase(test.NoDBTestCase,
'min_unit': 1,
'max_unit': 1024,
'step_size': 1,
- 'allocation_ratio': 1.5,
+ 'allocation_ratio': 1.0,
},
orc.DISK_GB: {
'total': 95,
diff --git a/releasenotes/notes/update-initial-allocation-defaults-94106033b66b8fa0.yaml b/releasenotes/notes/update-initial-allocation-defaults-94106033b66b8fa0.yaml
new file mode 100644
index 0000000000..937c8d1c8a
--- /dev/null
+++ b/releasenotes/notes/update-initial-allocation-defaults-94106033b66b8fa0.yaml
@@ -0,0 +1,21 @@
+---
+upgrade:
+ - |
+ In this release the default values for the initial ram and cpu allocation
+ ratios have been updated to 1.0 and 4.0 respectively. This will not
+ affect any existing compute node resource providers but the new default
+ will take effect on the creation of new resource providers.
+other:
+ - |
+ The default initial allocation ratios enabled ram over commit by default
+ with a factor of ``1.5``. This value was chosen early in nova's history
+ as the predominant workload was web hosting or other light weight
+ virtualization. Similarly the default initial cpu allocation ratio
+ defaulted to 16. As more demanding workload from telco, enterprise,
+ scientific and governmental users became the norm the initial values we
+ had chosen became less and less correct overtime. These have now been
+ updated to reflect a more reasonable default for the majority of our users.
+ As of this release the initial ram allocation value is 1.0 disabling
+ overcommit by default for new compute nodes and the initial cpu allocation
+ ratio is now 4.0 which is a more reasonable overcommit for non idle
+ workloads.