Configure the Elasticsearch Service Heap Size

By default, the Elasticsearch service is configured to use a minimum heap size of 256 MB and a maximum heap size of 1 GB. You can edit the warden.elasticsearch.conf file on each node to override the default values.

  1. Configure the following properties in the opt/mapr/conf/conf.d/warden.elasticsearch.conf file on each node:
    service.heapsize.min
    The minimum heap size in megabytes. For example, service.heapsize.min=1000.
    service.heapsize.max
    The maximum heap size in megabytes. For example, service.heapsize.max=1000. This value must match the value of ES_HEAP_SIZE.
    ES_HEAP_SIZE set with service.env
    The maximum heap size for the service. When you configure the size, specify the value and the unit. For example, service.env=ES_HEAP_SIZE=1g. This value must match the value set for service.heapsize.max.
  2. Restart the Elasticsearch service.
    maprcli node services -name elasticsearch -nodes <space separated list of Elasticsearch nodes> -action restart
Tip:
  • On production cluster, you can lock Elasticsearch memory to improve performance. To lock Elasticsearch memory, set the “bootstrap.mlockall: true” option in elasticsearch.yml (/opt/mapr/elasticsearch/elasticsearch-<version>/etc/elasticsearch/elasticsearch.yml)
  • If Elasticsearch uses more than 75% of the configured heap size, you may want to increase the maximum heap size value.

    For more information, see the Elasticsearch documentation.