# Limit Memory Provisioning in Platform9 Managed OpenStack

## Problem

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

## Environment

* Platform9 Managed OpenStack - All Versions

## Procedure

1. Login to the *nova*- *compute* host where memory allocation needs to be changed.
2. Verify the configuration file/directory used by the ***pf9-ostackhost*** ( *nova-compute*) service.

{% tabs %}
{% tab title="None" %}

```none
/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
```

{% endtab %}
{% endtabs %}

3. Edit the *conf* file and change the following entry to the appropriate value.

{% tabs %}
{% tab title="None" %}

```none
ram_allocation_ratio = 1.5
```

{% endtab %}
{% endtabs %}

4. Restart the ***pf9-ostackhost*** service for the changes to take effect.

{% tabs %}
{% tab title="None" %}

```none
# systemctl restart pf9-ostackhost.service
```

{% endtab %}
{% endtabs %}

**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](http://support.pf9.io).

## Additional Information

OpenStack permits reserving memory for the operating system functions. The controlling parameter accepts the numerical value in MB.

{% tabs %}
{% tab title="None" %}

```none
reserved_host_memory_mb = 512
```

{% endtab %}
{% endtabs %}

OpenStack documentation pertaining to memory and CPU allocation can be found [here](https://docs.openstack.org/arch-design/design-compute/design-compute-overcommit.html).
