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 -Xmx to a bigger size.

Workers

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.

Python and native memory

Python workers can also run out of memory due to native memory growth outside the Java heap. When Python code runs in a worker — particularly user-defined functions in query strings — Python objects are allocated in native memory that is not tracked by JVM settings like -Xmx.

To account for this, use the Additional Memory setting when creating Persistent Queries or Code Studios. This reserves extra memory beyond the JVM heap for Python native code, Java direct memory, and other non-heap allocations. For Python-heavy workloads, increase this value based on expected native memory usage.

For more information about Python memory behavior, see the Python-Java boundary documentation.

System processes managed by M/Monit

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.