To achieve that, you should:
- create a folder:
/etc/systemd/system/instana-agent.service.d
- inside
instana-agent.service.d
directory create a filememory.conf
- add this:
[Service]
Environment=AGENT_MAX_MEM=1024m
Environment=INSTANA_USE_MEMORY_CALCULATOR=true
Note: This way, INSTANA_USE_MEMORY_CALCULATOR
will calculate automatically how much heap memory to set. Set AGENT_MAX_MEM
value depending on your host memory.
- reload the daemon:
systemctl daemon-reload
- then restart the agent:
systemctl restart instana-agent.service
- check if AGENT_MAX_MEM is recognized:
systemctl status instana-agent.service -l
If this is installation without systemd, it means that the memory calculator is not enabled, so adjusting the JAVA_OPTS=-xmx parameter approach should be used. It can be achieved by editing the /opt/instana/agent/bin/setenv file.
Environment variable: JAVA_OPTS
Value: String, space-separated JVM arguments
Description: Additional Java Virtual Machine configurations you may want to pass to the startup of the host agent. For example, you may use -Xms<value>
and -Xmx<value>
to set the minimum and maximum amount of heap available to the agent, respectively.
Comments