Elasticsearch heap size JVM 메모리 할당 공식 문서 구성
3238 단어 Elasticsearch
기본 1G 힙 크기 설정
By default, Elasticsearch tells the JVM to use a heap with a minimum and maximum size of 1 GB. When moving to production, it is important to configure heap size to ensure that Elasticsearch has enough heap available.
Elasticsearch will assign the entire heap specified in jvm.options via the
Xms
(minimum heap size) and Xmx
(maximum heap size) settings. The value for these setting depends on the amount of RAM available on your server. Good rules of thumb are:
Xms
) and maximum heap size ( Xmx
) to be equal to each other. Xmx
to no more than 50% of your physical RAM, to ensure that there is enough physical RAM left for kernel file system caches. Xmx
to above the cutoff that the JVM uses for compressed object pointers (compressed oops); the exact cutoff varies but is near 32 GB. You can verify that you are under the limit by looking for a line in the logs like the following: heap size [1.9gb], compressed ordinary object pointers [true]
-XX:+UnlockDiagnosticVMOptions -XX:+PrintCompressedOopsMode
and looking for a line like the following: heap address: 0x000000011be00000, size: 27648 MB, zero based Compressed Oops
showing that zero-based compressed oops are enabled instead of heap address: 0x0000000118400000, size: 28672 MB, Compressed Oops with base: 0x00000001183ff000
Here are examples of how to set the heap size via the jvm.options file:
-Xms2g
-Xmx2g
Set the minimum heap size to 2g.
Set the maximum heap size to 2g.
구성 방법:
It is also possible to set the heap size via an environment variable. This can be done by commenting out the
Xms
and Xmx
settings in the jvm.options
file and setting these values via ES_JAVA_OPTS
: ES_JAVA_OPTS="-Xms2g -Xmx2g" ./bin/elasticsearch
ES_JAVA_OPTS="-Xms4000m -Xmx4000m" ./bin/elasticsearch
Set the minimum and maximum heap size to 2 GB.
Set the minimum and maximum heap size to 4000 MB.
Configuring the heap for the Windows service is different than the above. The values initially populated for the Windows service can be configured as above but are different after the service has been installed. Consult the Windows service documentation for additional details.
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
Embulk를 사용하여 ElasticCloud로 보내기Embulk에서 ElasticCloud에 보낼 수 있을까라고 생각비망록도 겸해 기술을 남깁니다 Embulk 설치 ElasticCloud (14 일 체험판) brew라면 아래 명령 입력 파일 만들기 파일 내용 seed...
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.