https://www.kernel.org/doc/Documentation/sysctl/vm.txt 문서에 따르면 max_map_count의 값은 65536으로 되어 있다.
max_map_count:
This file contains the maximum number of memory map areas a process may have. Memory map areas are used as a side-effect of calling malloc, directly by mmap and mprotect, and also when loading shared libraries.
While most applications need less than a thousand maps, certain programs, particularly malloc debuggers, may consume lots of them, e.g., up to one or two maps per allocation.
The default value is 65536.
$ cat /proc/sys/vm/max_map_count
65530
일래스틱서치 5에서는 이 값이 너무 작아서. 효율이 떨어지기 때문에 아래처럼 크게 잡아야 한다고 한다(설치할 때 자동으로 바꾼다)
sysctl -w vm.max_map_count=262144
참고 문서 : 5.3 문서
https://www.elastic.co/guide/en/elasticsearch/reference/current/vm-max-map-count.html
Virtual memoryedit
Elasticsearch uses a hybrid mmapfs / niofs
directory by default to store its indices. The default operating system limits on mmap counts is likely to be too low, which may result in out of memory exceptions.
On Linux, you can increase the limits by running the following command as root
:
sysctl -w vm.max_map_count=262144
To set this value permanently, update the vm.max_map_count
setting in /etc/sysctl.conf
. To verify after rebooting, run sysctl vm.max_map_count
.
The RPM and Debian packages will configure this setting automatically. No further configuration is required.
구 2.x 문서
https://www.elastic.co/guide/en/elasticsearch/guide/current/_file_descriptors_and_mmap.html
Elasticsearch also uses a mix of NioFS and MMapFS for the various files. Ensure that you configure the maximum map count so that there is ample virtual memory available for mmapped files. This can be set temporarily:
sysctl -w vm.max_map_count=262144
Or you can set it permanently by modifying vm.max_map_count
setting in your /etc/sysctl.conf
.
'Elasticsearch' 카테고리의 다른 글
[elasticsearch 5] 매트릭스 통계(matrix stats) (0) | 2017.05.17 |
---|---|
[elasticsearch 5] 파이프라인 집계 (0) | 2017.05.17 |
elasticsearch 1.3 - NodeDisconnectedException (0) | 2017.04.03 |
[logstash] kafka 연동 설정 (0) | 2017.03.13 |
[elasticsearch] 벤치마크 툴 Rally (1) | 2016.09.07 |