Skip to content

Commit 4253e44

Browse files
authored
Revise mmapfs requirements
* Move RPM/Debian note above for clarity. * Add info on checking the setting before changing it I've noticed on my machine by default it has been set to 1048576
1 parent 9937af8 commit 4253e44

File tree

1 file changed

+19
-7
lines changed

1 file changed

+19
-7
lines changed

docs/reference/setup/sysconfig/virtual-memory.asciidoc

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,25 @@
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
1630
To 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-
2233
You can find out the current mmap count of a running Elasticsearch process
2334
using the following command, where `$PID` is the process ID of the running
2435
Elasticsearch process:
36+
2537
[source,sh]
2638
----------------------------
2739
wc -l /proc/$PID/maps

0 commit comments

Comments
 (0)