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
More on Logs, Limits & High-Traffic Tuning
How does log management work on a modern Linux server?BeginnerWhy centralize logs instead of reading them on each server?BeginnerWrite a logrotate config for an application log.BeginnerWhat is the difference between `copytruncate` and `create` + postrotate signal?IntermediateLogs rotated but disk usage did not drop. Why?IntermediateHow often does logrotate run, and why does `maxsize` sometimes not trigger in time?Intermediate