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.

Setting memory limits for containers helps ensure predictable resource usage and protects the host system from excessive memory consumption.

Many modern runtimes, including Java, use garbage collection (GC) to manage memory allocation. These mechanisms generally behave more predictably when a memory boundary is defined. Without a defined limit, a container may continue allocating memory as long as the host system has available RAM.

In such situations, a single container could consume large amounts of memory and potentially impact the performance or stability of other containers running on the same host.

More information about garbage collection can be found here: https://en.wikipedia.org/wiki/Garbage_collection_(computer_science)arrow-up-right

New Helmut4 Installation

By default, this RAM limitation setting is included in every new Helmut4 installation, whether it is deployed as a single server or a cluster system.

The RAM limits are defined as default parameters 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:

circle-info

Environment-Specific Adjustments

Please note that these values may need to be adjusted depending on your system requirements.

For example, systems with high I/O activity or CPU load may require additional memory for related containers such as io, co, or mongodb.

Example

Below is an example configuration showing a RAM limit for the language container:

language image with ram limit
chevron-rightGeneric resource configuration templatehashtag

Single Server

Cluster Server

Default RAM limits

The following values can be considered as defaults:

circle-info

Environment-Specific Adjustments

The following values can be considered default recommendations.

Please note that these values may need to be adjusted depending on your system requirements. For example, systems with high I/O and CPU workloads might require increased memory for containers such as io, co, and mongodb.

Container / Image
Memory (MB)

traefik

250

hp

300

hw

300

fx

1500

io

2000

co

2000

hk

1500

users

1500

streams

2000

preferences

400

metadata

350

logging

350

amqp

250

license

400

language

350

cronjob

300

mongodb / mongodbrs

4000

mongodb_backup

1000

mongodb_admin/express

250

rabbitmq

2000

2500

Last updated