Configure the OpenTSDB Service Heap Size

By default, the OpenTSDB service is configured to use a default heap size of 6 gigabytes. The default heap size can be adjusted by modifying certain configuration files.

In EEPs 6.0.1 and later, the OpenTSDB service is configured to use a default heap size of 6 GB. In earlier EEPs, the default was configured to be 2 GB. If you configure a custom value for the OpenTSDB service heap size and then upgrade to EEPs 6.0.1 or later, you will see the 6-GB default implemented in the /opt/mapr/conf/conf.d/warden.opentsdb.conf file.

To change the heap size to a different setting, edit the configuration files on all OpenTSDB nodes as follows. The following steps change the heap size from 2 GB to 6 GB. The default heap size might need further adjustment if your cluster grows to a large number of nodes. If the 6-GB heap size is insufficient, you can use these same steps to adjust it:

  1. Edit the /opt/mapr/conf/conf.d/warden.opentsdb.conf file to change:
    service.heapsize.max=2000
    service.heapsize.min=2000
    to
    service.heapsize.max=6000
    service.heapsize.min=6000
  2. Edit the /opt/mapr/opentsdb/opentsdb-*/etc/init.d/opentsdb file to change:
    NOTE Step 2 is not required for EEPs 6.0.1 and later, which contain logic to edit the opentsdb file automatically.
    $
    {JVMXMX:=-Xmx2000m -Xss1m -XX:MaxMetaspaceSize=128m}
    to
    $
    {JVMXMX:=-Xmx6000m -Xss1m -XX:MaxMetaspaceSize=128m}
  3. Restart the OpenTSDB service:
    maprcli node services -name opentsdb -nodes <space-separated list of OpenTSDB nodes> -action restart