Increase platform memory reserve on AIO hosts

Increase memory reserve for AIO by 1000 MiB.  Total memory reserve for
AIO in MiB will be 5000 + 2000 + 1000 * number of numa nodes.  This will
give more headroom for AIO-SX subclouds with a single numa node.

Closes-Bug: 1923399
Change-Id: I433548792504f783a44a80d5099d93c5bee15ed7
Signed-off-by: Gerry Kopec <gerry.kopec@windriver.com>
This commit is contained in:
Gerry Kopec 2021-04-08 19:48:13 -04:00
parent 78a417d548
commit d1a13c9b3f
2 changed files with 5 additions and 8 deletions

View File

@ -242,7 +242,7 @@ PLATFORM_CORE_MEMORY_RESERVED_MIB_VBOX = 1100
PLATFORM_CORE_MEMORY_RESERVED_MIB_VBOX_WORKER = 2000
# For AIO config, memory reserved for controller in MiB
COMBINED_NODE_CONTROLLER_MEMORY_RESERVED_MIB = 4000
COMBINED_NODE_CONTROLLER_MEMORY_RESERVED_MIB = 5000
COMBINED_NODE_CONTROLLER_MEMORY_RESERVED_MIB_VBOX = 3000
COMBINED_NODE_CONTROLLER_MEMORY_RESERVED_MIB_XEOND = 3000

View File

@ -1036,16 +1036,14 @@ def get_required_platform_reserved_memory(dbapi, ihost, numa_node, low_core=Fals
required_reserved += \
constants.DISTRIBUTED_CLOUD_CONTROLLER_MEMORY_RESERVED_MIB // numa_node_count
elif host_has_function(ihost, constants.WORKER):
# Engineer 2G per numa node for disk IO RSS overhead
# Engineer reserve per numa node for disk IO RSS overhead
required_reserved += constants.DISK_IO_RESIDENT_SET_SIZE_MIB
if numa_node == 0:
# Engineer 2G for worker to give some headroom;
# typically requires 650 MB PSS
# Engineer platform reserve for worker
required_reserved += \
constants.PLATFORM_CORE_MEMORY_RESERVED_MIB
if host_has_function(ihost, constants.CONTROLLER):
# Over-engineer controller memory.
# Typically require 5GB PSS; accommodate 2GB headroom.
# If AIO, reserve additional memory for controller function.
# Controller memory usage depends on number of workers.
if low_core:
required_reserved += \
@ -1054,8 +1052,7 @@ def get_required_platform_reserved_memory(dbapi, ihost, numa_node, low_core=Fals
required_reserved += \
constants.COMBINED_NODE_CONTROLLER_MEMORY_RESERVED_MIB
else:
# If not a controller,
# add overhead for metadata and vrouters
# If not a controller, add overhead for metadata and vrouters
required_reserved += \
constants.NETWORK_METADATA_OVERHEAD_MIB
elif ihost['personality'] == constants.CONTROLLER: