- odigos-otelcol — the Odigos distribution of the OpenTelemetry Collector.
- odigos-vmagent — the VM Agent that discovers, instruments, and manages processes.
MemoryMax (hard limit)
and MemoryHigh (soft throttling limit) directives. This is useful on hosts where you need to
guarantee that the agent never competes with your application workloads for memory.
Both services are Go binaries, so you should also set the GOMEMLIMIT
environment variable. This tells the Go runtime a soft memory ceiling and makes the garbage collector
run more aggressively as the process approaches it — reclaiming memory before systemd throttles or
OOM-kills the service.
Default limits
Both services ship with memory limits already configured out of the box, so you only need the steps on this page if you want to change them. The default values in the packaged unit files are:MemorySwapMax=0 disables swap usage for the service, and MemoryAccounting=yes enables per-service
memory tracking so the limits above are enforced. LimitMEMLOCK=infinity is required by the eBPF
profiler and is unrelated to the memory caps.How systemd memory limits work
Editing the memory limits
The recommended way to change unit settings is a systemd drop-in override. This keeps your changes separate from the packaged unit file, so they are preserved across upgrades of the Odigos packages.1
Open a drop-in override for the service
Use This opens an editor for a new file at
systemctl edit to create an override file. Run the command for the service you want to limit:/etc/systemd/system/<service>.service.d/override.conf.2
Add the memory limits
Add a Do the same for
[Service] section with the limits you want. Set the systemd memory caps and the
GOMEMLIMIT environment variable for the Go runtime. For example, to cap odigos-otelcol at 512 MB:odigos-vmagent with values that suit your host, for example:MemoryHigh / MemoryMax accept the usual systemd suffixes (M, G) or a percentage of total host
memory (for example MemoryMax=10%); use infinity to remove a limit. GOMEMLIMIT uses Go
byte-size suffixes (MiB, GiB) and can be set to off to disable the runtime limit.3
Reload systemd and restart the service
Apply the new configuration and restart the affected service:
4
Verify the applied limits
Confirm that systemd is enforcing the values you set, including the You can also watch live memory usage of a running service with:
GOMEMLIMIT environment variable:Editing the unit files directly (alternative)
If you prefer, you can edit the packaged unit files in place instead of using drop-ins. The unit files are located at:/etc/systemd/system/odigos-otelcol.service/etc/systemd/system/odigos-vmagent.service
MemoryHigh, MemoryMax, and Environment=GOMEMLIMIT=... under the existing [Service]
section, then reload and restart:
For
odigos-otelcol you can alternatively set GOMEMLIMIT in its environment file at
/etc/odigos-otelcol/odigos-otelcol.conf instead of using Environment= in the unit.