Hi Rohit,
There’s no single right value. It depends on what your app actually uses, so you measure first and then set the limits. Here’s how I’d approach each question.
1. What should I put for mem_limit and mem_reservation?
On Industrial Edge there are two levels of memory settings:
How to find the values:
Step 1: Run the app on your PC with realistic load (real data, typical requests, the heaviest operation) and watch memory usage with:
docker stats
Step 2: Set mem_reservation to the normal steady usage and mem_limit to the peak plus about 25–30% headroom. For example, if a service normally uses 120 MB and peaks at 200 MB, use 128m and 256m.
Step 3: Set the app-level values in the App Publisher to cover all services together.
On a 1 GB device, never plan for the full 1 GB. The operating system, the Industrial Edge runtime and other apps need part of it.
2. How do I know when hardware limits are the real constraint?
docker inspect --format “{{.State.OOMKilled}} {{.State.ExitCode}}” your-container-name
3. How do you tune apps for constrained devices?
4. Will multiple services in one compose file install multiple apps?
No. One compose file is one app. The App Publisher packages all services into a single Industrial Edge app, which is installed, started and stopped as one unit, with each service running as its own container. Each service still needs its own mem_limit, and the app-level memory settings should cover all of them together.
If parts need to be installed or updated independently, package them as separate apps.
References
If this helps, please mark it as the accepted answer.
Hi Rohit,
For an Industrial Edge Device (IED) with 1 GB RAM, I would recommend measuring the application's actual memory usage first and then setting the memory reservation and limit accordingly. There is no single recommended value that works for every application.
mem_reservation and mem_limit?mem_reservation is a soft memory reservation. It helps the platform manage memory when resources become constrained.mem_limit is the maximum memory the container can use. If the container exceeds this limit, it may be stopped or terminated.For example, for a lightweight service, you could start testing with:
version: "2.4"
services:
my-service:
image: my-service:1.0
mem_reservation: 128m
mem_limit: 256m
These values are only an illustrative starting point, not a guaranteed recommendation for every 1 GB device. A Node-RED application, for example, may need more memory depending on its flows, payload sizes, and installed nodes.
mem_reservation based on the application's expected normal memory requirement.mem_limit high enough to accommodate measured peak usage, while leaving sufficient memory for the operating system, platform services, and other applications.Do not allocate the entire 1 GB to your application. The device needs memory for its operating system and Industrial Edge services as well.
Check both memory and CPU usage while the application is running. Also review container logs for out-of-memory errors and inspect whether the application is restarting or becoming unresponsive.
Use the Apps Memory statistics in Industrial Edge Management where available. Compare the application's measured peak usage against its configured memory limit and the device's remaining available memory.
Each service runs in its own container, so configure memory limits for each service separately.
For example:
version: "2.4"
services:
api:
image: my-api:1.0
mem_reservation: 128m
mem_limit: 256m
worker:
image: my-worker:1.0
mem_reservation: 128m
mem_limit: 256m
In this example, the two containers have a combined configured maximum of 512 MB. That does not mean they will always consume 512 MB, but you must account for the possibility that both approach their limits simultaneously.
Also account for shared memory, where applicable, because it contributes to the memory usage of the relevant application.
Important: If your application has multiple containers, do not confuse the individual container limits with the overall application memory reservation and limit configured in IE App Publisher. Review both configurations and ensure they are consistent with your device's available resources.
My recommendation is to start with measured memory usage rather than selecting arbitrary values. For a 1 GB device, test the application under peak load and verify that the combined application and platform memory requirements fit within the available RAM.
Hope this helps! If you find this answer helpful, please mark it as the accepted answer.