Merge "update default overcommit"

This commit is contained in:
Zuul 2022-10-07 02:29:22 +00:00 committed by Gerrit Code Review
commit 03d2715ed4
8 changed files with 49 additions and 15 deletions

View File

@ -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
~~~~~~~~~~~~~~~~~~~~~~~~~

View File

@ -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.

View File

@ -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

View File

@ -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,

View File

@ -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):

View File

@ -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: {

View File

@ -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,

View File

@ -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.