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 MEPs 6.0.1 and later, the OpenTSDB service is configured to use a default heap size of 6 GB. In earlier MEPs, the default was configured to be 2 GB. If you configure a custom value for the OpenTSDB service heap size and then upgrade to MEPs 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:

  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:
    $
    {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