2018年11月22日 星期四

[elasticsearch] max virtual memory areas vm.max_map_count [65530] likely too low, increase to at least [262144]

[elasticsearch] max virtual memory areas vm.max_map_count [65530] likely too low, increase to at least [262144]
開啟 Elasticsearch時,如果出現下面訊息,

Exception in thread "main" java.lang.RuntimeException: bootstrap checks failed
initial heap size [268435456] not equal to maximum heap size [2147483648]; this can cause resize pauses and prevents mlockall from locking the entire heap
max virtual memory areas vm.max_map_count [65530] likely too low, increase to at least [262144]


是 vm.max_map_count 沒有做調整的原因

sudo sysctl -w vm.max_map_count=262144

在 32GB 的系統上

因為,elasticsearch 使用了mmap

elasticsearch:5.0.0 max virtual memory areas vm.max_map_count [65530] likely too low, increase to at least [262144] · Issue #111 · docker-library/elasticsearch https://github.com/docker-library/elasticsearch/issues/111
理解虚拟内存 - 技术翻译 - 开源中国社区 https://www.oschina.net/translate/understanding-virtual-memory?print
Actian Vector http://docs.actian.com/vector/4.2/index.html#page/User/Increase_max_map_count_Kernel_Parameter_(Linux).htm
where map_count should be around 1 per 128 KB of system memory. For example:
vm.max_map_count=2097152
on a 256 GB system.



沒有留言:

張貼留言