Type to search.

Increase virtual memory

Self-managed

Self-managed deployments are Elastic Stack deployments managed without the assistance of an orchestrator.

Availability

  • Generally available

    This functionality is generally available and ready for production usage.

This documentation corresponds to the latest patch available for each minor version. If you're not using the latest patch, check the release notes for changes.

Elasticsearch uses a mmapfs directory by default to store its indices, which relies on memory-mapped files. As a result, the default operating system limit for the maximum number of memory mappings per process (vm.max_map_count) must be adequately high. If this limit is too low, the node might fail to start or encounter out-of-memory errors.

Verify vm.max_map_count configuration

If the operating system's default vm.max_map_count value is 1048576 or higher, no configuration change is necessary. If the default value is lower than 1048576, configure the vm.max_map_count parameter to 1048576.

On Linux, you can increase the limits of the vm.max_map_count parameter by following this step as an account with root privileges:

Shell
sysctl -w vm.max_map_count=1048576

To set this value permanently, update the vm.max_map_count setting in /etc/sysctl.conf.

To verify after rebooting, run:

Shell
sysctl vm.max_map_count

To reflect the change immediately, without rebooting, run:

Shell
sudo sysctl --system

While RPM and Debian packages attempt to configure this automatically, setting the value in /etc/sysctl.conf ensures that it takes precedence and that the correct value is applied, overriding any package-level defaults.

You can find out the current mmap count of a running Elasticsearch process using the following command, where $PID is the process ID of the running Elasticsearch process:

Shell
wc -l /proc/$PID/maps