# Limit docker container RAM usage

With the release of Helmut 4.8.x and the corresponding update to the Java environment, it is now possible to limit the maximum amount of RAM a container can allocate.

### **New Helmut4 Installation**

By default, this RAM limitation setting is included in every new Helmut4 installation, whether it is a single server or a cluster. This setting is now a default parameter in the stack YAML file.

### **Updating Existing Helmut4 Installations**

Existing Helmut4 installations can be updated to use the same resource allocation settings. To implement this change, users need to update the stack YAML configuration.

You can download the default stack YAML file from our repository for reference:

* **Single Server:** <https://repo.moovit24.de/install/config/docker-compose.yml>
* **Cluster System:** <https://repo.moovit24.de/install/config/docker-compose-swarm.yml>

{% hint style="info" %}
Please note that you may need to adjust these values to meet your system's requirements.&#x20;

For example, a system with high I/O and CPU demands might require increased memory for linked containers such as io, co and mongodb.
{% endhint %}

#### Example

Here is an example screenshot of the language container:

<figure><img src="/files/tuIrGclPUjxqmEdAeTGM" alt="" width="563"><figcaption><p>language image with ram limit</p></figcaption></figure>

<details>

<summary>Generic resource configuration template</summary>

Single Server

```yaml
deploy:
   resources:
      limits:
         memory: 250M
```

Cluster Server

```yaml
deploy:
   mode: global
   #mode: replicated
   resources:
      limits:
         memory: 250M
```

</details>

### **Default RAM limits**

The following values can be considered as defaults:

| Container / Image                                                                                                | Memory (MB) |
| ---------------------------------------------------------------------------------------------------------------- | ----------- |
| traefik                                                                                                          | 250         |
| hp                                                                                                               | 100         |
| hw                                                                                                               | 100         |
| fx                                                                                                               | 1500        |
| io                                                                                                               | 2000        |
| co                                                                                                               | 2000        |
| hk                                                                                                               | 1500        |
| users                                                                                                            | 1500        |
| streams                                                                                                          | 2000        |
| preferences                                                                                                      | 500         |
| metadata                                                                                                         | 250         |
| logging                                                                                                          | 250         |
| amqp                                                                                                             | 250         |
| license                                                                                                          | 250         |
| language                                                                                                         | 250         |
| cronjob                                                                                                          | 250         |
| mongodb / mongodbrs                                                                                              | 2000        |
| mongodb\_backup                                                                                                  | 250         |
| mongodb\_admin                                                                                                   | 250         |
| rabbitmq                                                                                                         | 2000        |
| hc ([linux client](/helmut4-releases/v4.10.1/getting-started/installation-guide/helmut4-client.md#linux-client)) | 2500        |


---

# 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.helmut.de/helmut4-releases/v4.10.1/getting-started/additional-configurations/limit-docker-container-ram-usage.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.
