Setting the Memory Used by Elasticsearch

Setting the Memory Used by Elasticsearch

Question

Can I increase the JVM for Elasticsearch?

Answer

Yes, it is possible to adjust the Elasticsearch JVM size. By default, Digital Hive sets the Elasticsearch JVM to 500 MB for each node and this is sufficient for most environments. If your environment has a large amount of data to index or you're seeing memory errors in the Elasticsearch logs, you will want to increase the JVM.

Adjusting the Elasitcsearch JVM in Windows

  1. In Services, stop Digital - node1, Elasticsearch 5.5.1 (DigitalHive_9200) and Elasticsearch 5.5.1 (DigitalHive_9201) 
  2. In File Explorer, navigate to DigitalHive\Elasticsearch\bin
  3. Right click elasticsearch-service-mgr
  4. Select Send to > Desktop (create shortcut)
  5. Rename the shortcut to indicate this is node1, for example elasticsearch-node1
  6. Right click elasticsearch-node1 and select Properties
  7. In Target, append  //ES//DigitalHive_9200
  8. Click OK
  9. Double click elastiscsearch-node1
  10. Click Yes
  11. Click the Java tab
  12. Set Initial memory pool and Maximum memory pool to the size you want. In this example, I increased it to 1 GB
  13. Clik OK
  14. Repeat steps 2 to 13, except name this shortcut elasticsearch-node2 and in Target append //ES//DigitalHive_9201
  15. In Services, start Elasticsearch 5.5.1 (DigitalHive_9200), Elasticsearch 5.5.1 (DigitalHive_9201) and DigitalHive - node1
Elasticsearch is now configured for a 1 GB JVM for each node.

Adjusting the Elasitcsearch JVM in Linux

  1. Navigate to your DigitalHive home, in this example, cd /home/mk3admin/DigitalHive
  2. Stop Digital HIve by running ./stopAll.sh
  3. Edit DigitalHive home/Elasticsearch/config/jvm.options, for example, vi /home/mk3admin/DigitalHive/Elasticsearch/config/jvm.options
  4. Change the -Xms512m and -Xmx512m to the size you want, for example, if you want to set the JVM to 1 GB, then set them to -Xms1g -Xmx1g
  5. Save :wq
  6. Start DigitalHive by running ./startAll.sh
Elasticsearch is now configured for a 1 GB JVM for each node.

    • Related Articles

    • Setting the Memory Used by Digital Hive

      Question How do you set the amount of memory that Digital Hive uses? Answer If you have lots of available memory on the Digital Hive server you will want to increase the Tomcat JVM. Setting the Tomcat Memory in Windows In Services, stop DigitalHive - ...
    • Setting up Cognos SSO

      Question Is it possible to SSO into Cognos from Digital Hive? Answer Yes, it is possible, but it requires our Digital Hive jar files and some changes to all of the IBM Cognos Content Managers in your environment. IBM Cognos Analytics Configuration ...
    • Digital Hive Designer Elements Used for Authoring Hives

      Overview Digital Hive provides a very robust, zero code, authoring experience that enables authors to create visually stunning and impactful end user applications, called Hives. As part of the authoring process, there are different elements that can ...
    • Digital Hive Installation and Configuration Overview

      Overview This article serves as a collection of all the steps required to install and configure the Digital Hive solution. Prerequisites Digital Hive can be installed on either Windows or Linux based systems. From a server sizing perspective, the ...
    • Unable to Explore Digital Hive Content

      Question When using the Explore Content interface to browse the Digital Hive content, a message stating "Something went wrong" and a Try Again button is displayed How do I resolve this? Answer This issue is usually a result of Elasticsearch being ...