Question & Answer
Question
Answer
To increase the Agent heap memory by using Memory Calculator, use the following steps:
- Create a folder: /etc/systemd/system/instana-agent.service.d
- Inside instana-agent.service.d directory, create a file memory.conf
- Add the following code snippet in memory.conf file:
[Service]
Environment=AGENT_MAX_MEM=1024m
Environment=INSTANA_USE_MEMORY_CALCULATOR=true
Note: This way, INSTANA_USE_MEMORY_CALCULATOR calculates automatically how much heap memory to set. Set the "AGENT_MAX_MEM" value according to your host's 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 an installation without systemd, it means that the memory calculator is not enabled. Use the JAVA_OPTS=-xmx parameter. It can be achieved by editing the /opt/instana/agent/bin/setenv file.
Environment variable: JAVA_OPTS
Value: String, space-separated JVM arguments
Description: More Java Virtual Machine configurations you might want to pass to the startup of the host agent. For example, you can use -Xms<value> and -Xmx<value> to set the minimum and maximum amount of heap available to the agent, respectively.
Was this topic helpful?
Document Information
Modified date:
15 May 2023
UID
ibm16991455