Elasticsearch memory size setting

Elasticsearch memory size setting

Find the installation directory of elasticsearch, and then find the config folder, which contains related configuration files.

Officials do not recommend directly modifying jvm.options, but copy jvm.options to the jvm.options.d directory, and then modify.

Among them, jvm.options can modify the memory allocation when es is running. Open the jvm.options file, we can find that the default memory is 4g.

################################################################
## IMPORTANT: JVM heap size
################################################################
##
## The heap size is automatically configured by Elasticsearch
## based on the available memory in your system and the roles
## each node is configured to fulfill. If specifying heap is
## required, it should be done through a file in jvm.options.d,
## which should be named with .options suffix, and the min and
## max should be set to the same value. For example, to set the
## heap to 4 GB, create a new file in the jvm.options.d
## directory containing these lines:
##
## -Xms4g
## -Xmx4g
##
## See https://www.elastic.co/guide/en/elasticsearch/reference/8.6/heap-size.html
## for more information
##
###############################################################

Modify the memory to the actual size you want, save it, and restart es.

Guess you like

Origin blog.csdn.net/fhw925464207/article/details/131060932