- By default, the memory allocation is done in a ratio of 1:1.5 for physical memory to allocated memory.
- Memory allocation ratio can be reduced if memory overcommit is impacting the performance of the host and instances running on it.
- Platform9 Managed OpenStack - All Versions
- Login to the nova-compute host where memory allocation needs to be changed.
- Verify the configuration file/directory used by the pf9-ostackhost (nova-compute) service.
/opt/pf9/venv/bin/python /opt/pf9/venv/bin/pf9-ostackhost --config-dir /opt/pf9/etc/nova/conf.d/ --log-file /var/log/pf9/ostackhost.log
- Edit the conf file and change the following entry to the appropriate value.
ram_allocation_ratio = 1.5
- Restart the pf9-ostackhost service for the changes to take effect.
# systemctl restart pf9-ostackhost.service
Note: The above steps will change the memory allocation ratio on a single OpenStack Nova host. To change memory allocation across all Nova hosts, please contact Platform9 support.
OpenStack permits reserving memory for the operating system functions. The controlling parameter accepts the numerical value in MB.
reserved_host_memory_mb = 512
OpenStack documentation pertaining to memory and CPU allocation can be found here.