Interview Prep/Linux/Logs, Limits & High-Traffic Tuning

How do you size `vm.max_map_count` and why do Elasticsearch/OpenSearch need it?

IntermediateProductionLogs, Limits & High-Traffic Tuning
Answer

vm.max_map_count limits the number of memory mappings a process may have (default 65530). Elasticsearch/OpenSearch mmap many index files and refuse to start in production mode below 262144: max virtual memory areas vm.max_map_count [65530] is too low.

echo 'vm.max_map_count=262144' | sudo tee /etc/sysctl.d/99-es.conf && sudo sysctl --system
All Linux questions Roadmap: Linux

More on Logs, Limits & High-Traffic Tuning