11[[vm-max-map-count]]
22=== Virtual memory
33
4- Elasticsearch uses a <<mmapfs,`mmapfs`>> directory by
5- default to store its indices. The default operating system limits on mmap
6- counts is likely to be too low, which may result in out of memory exceptions.
4+ Elasticsearch uses a <<mmapfs,`mmapfs`>> directory by default to store
5+ its indices.
76
8- On Linux, you can increase the limits by running the following command as
7+ Checking operating system limits on mmap counts might be
8+ advisable, otherwise running Elastic may result in out of memory exceptions.
9+
10+ NOTE: On recent Linux distribution versions this limit should be
11+ sufficient. +
12+ The RPM and Debian packages will configure this setting automatically. In
13+ such case, no further configuration is required.
14+
15+ To confirm the limits on Linux, you can run the following command:
16+
17+ [source,sh]
18+ -------------------------------------
19+ sysctl vm.max_map_count
20+ -------------------------------------
21+
22+ If needed, you can increase the limits by running the following command as
923`root`:
1024
1125[source,sh]
@@ -16,12 +30,10 @@ sysctl -w vm.max_map_count=262144
1630To set this value permanently, update the `vm.max_map_count` setting in
1731`/etc/sysctl.conf`. To verify after rebooting, run `sysctl vm.max_map_count`.
1832
19- The RPM and Debian packages will configure this setting automatically. No
20- further configuration is required.
21-
2233You can find out the current mmap count of a running Elasticsearch process
2334using the following command, where `$PID` is the process ID of the running
2435Elasticsearch process:
36+
2537[source,sh]
2638----------------------------
2739wc -l /proc/$PID/maps
0 commit comments