How to change Elasticsearch max memory size

后端 未结 11 832
时光取名叫无心
时光取名叫无心 2020-11-30 16:57

I have an Apache server with a default configuration of Elasticsearch and everything works perfectly, except that the default configuration has a max size of 1GB.

I

11条回答
  •  星月不相逢
    2020-11-30 18:00

    • Elasticsearch will assign the entire heap specified in jvm.options via the Xms (minimum heap size) and Xmx (maximum heap size) settings.
      • -Xmx12g
      • -Xmx12g
    • Set the minimum heap size (Xms) and maximum heap size (Xmx) to be equal to each other.
    • Don’t set Xmx to above the cutoff that the JVM uses for compressed object pointers (compressed oops), the exact cutoff varies but is near 32 GB.

    • It is also possible to set the heap size via an environment variable

      • ES_JAVA_OPTS="-Xms2g -Xmx2g" ./bin/elasticsearch
      • ES_JAVA_OPTS="-Xms4000m -Xmx4000m" ./bin/elasticsearch

提交回复
热议问题