# Resource Allocation

The database resources allocated for your user contract are displayed in **Resource allocation**. The resources refer to the PostgreSQL **Clusters**, number of **CPU** cores, **RAM**, and **Storage** databases quota:

* 16 CPU Cores
* 32 GB RAM
* 10 database clusters
* 1500 GB Disk Space
* 5 instances within each cluster

You can view the number of resources that are available and can be used, and the number of resources already consumed. You can allocate resources when creating a database cluster based on the available resources. For resource allocation, contact [<mark style="color:blue;">IONOS CLOUD Support</mark>](https://docs.ionos.com/cloud/support/).

![Database resource allocation](/files/VjhvCDdCP8q6Avi5vJD1)

## Resource usage

**Calculating RAM Requirements:** The RAM size must be chosen carefully. There is 1 GB of RAM reserved to capture resource reservation for OS system daemons. Additionally, internal services and tools use up to 500 MB of RAM. To choose a suitable RAM size, the following formula must be used.

`ram_size` = `base_consumption` + X \* `work_mem` + `shared_buffers`

* The `base_consumption` and reservation of internal services is approximately 1500 MB.
* X is the number of parallel connections. The value `work_mem` is set to 8 MB by default.
* The `shared_buffers`is set to about 15% of the total RAM.

### Calculate disk requirements

The requested disk space is used to store all the data that PostgreSQL is working with, incl. database logs and WAL segments. Each PostgreSQL instance has its storage (of the configured size). The operating system and applications are kept separately (outside of the configured storage) and are managed by <code class="expression">space.vars.ionos\_cloud</code>.

If the disk runs full PostgreSQL will reject write requests. Make sure that you order enough margin to keep the PostgreSQL cluster operational. You can monitor the storage utilization in DCD.

**WAL segments:** In normal operation mode, older WAL files will be deleted once they have been replicated to the other instances and backed up to archive. If either of the two shipments is slow or failing then WAL files will be kept until the replicas and archive catch up again. Account for enough margin, especially for databases with high write load.

**Log files:** Database log files (175 MB) and auxiliary service log files (\~100 MB) are stored on the same disk as the database.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.ionos.com/cloud/databases/postgresql/overview/resource-allocation.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
