Agent Memory Management

You can increase the JVM heap memory by editing the /opt/instana/agent/bin/setenv file the.
The Environment variables for the heap size are JAVA_MIN_MEM and JAVA_MAX_MEM.

The default values are:
export JAVA_MIN_MEM=64m
export JAVA_MAX_MEM=160m

There is one additional change memory-related that can be can be implemented for our agent service:
MemoryMax=bytes
Specify the absolute limit on memory usage of the executed processes in this unit. If memory usage can't be contained under the limit, the out-of-memory killer is invoked inside the unit. 
It is recommended to use MemoryHigh= as the main control mechanism and use MemoryMax= as the last line of defense.
Takes a memory size in bytes. If the value is suffixed with K, M, G or T, the specified memory size is parsed as Kilobytes, Megabytes, Gigabytes, or Terabytes (with the base 1024), respectively. Alternatively, a percentage value may be specified, which is taken relative to the installed physical memory on the system.
If assigned the special value "infinity", no memory limit is applied. This controls the "memory.max" control group attribute. For details about this control group attribute, see cgroup-v2.txt.

There is no recommended size, it depends on a number of sensors/traces that are collected by the agent. In some cases, defaults are even more than what is needed but in some cases, we advise to increase the allocated memory. 
A practice we have is to increase it by 20% and check the memory usage as the instrumentation takes place. 
 
Thanks to Vladimir Hudjan for this information. 
Have more questions? Submit a request

Comments