How do I give a process more memory?
There are times when processes run out of memory. In this guide, we cover two common scenarios and how to resolve them.
You may run out of direct memory:
or Java heap memory:
- If you run out of direct memory, you need to set
-XX:MaxDirectMemorySize=<JVM size argument>to a bigger size. This is most commonly a problem for tailers and for binary logs. The default value we set for tailers is 1500m. - If you run out of heap memory, you need to set
-Xmxto a bigger size.
For workers, you can change the heap size in the Code Studio startup panel or Persistent Query settings. You may also need to change other parameters by editing the "Extra JVM Arguments" field.
For system processes managed by M/Monit (such as db_dis, tailer, or authentication_server), modify the hostconfig file by setting EXTRA_ARGS. Edit /etc/sysconfig/deephaven/illumon.iris.hostconfig (the customer override file) and add a process clause (e.g., tailer) ... ;;) within the existing case block.
Important
Always add to EXTRA_ARGS using the pattern EXTRA_ARGS="$EXTRA_ARGS <your args>" or EXTRA_ARGS="<your args> $EXTRA_ARGS" to preserve default settings. Java arguments must be prefixed with -j.
For example, to raise the direct memory size to 2500 MB for the tailer, add the following to /etc/sysconfig/deephaven/illumon.iris.hostconfig:
If the process ran out of Java heap, your change would look something like this:
Find the original (non-overridden) values in /etc/sysconfig/illumon.confs/hostconfig.system. However, the tailer's default memory settings are in /usr/illumon/latest/bin/start_tailer. Refer to these values to determine appropriate overrides.