Skip to content

Commit 9d0be14

Browse files
Adam Lockecarehart
Adam Locke
andauthored
Clarify commands shown for "permanently" setting max_map_count (#82345) (#83229)
* Clarify commands shown for "permanently" setting max_map_count The current text shows a grep, which of course does not set the value at all. I've clarified why it's offered (to CHECK the value). I've also moved the command for setting the value temporarily to above that discussion, to make it more clear to readers that that's what it does. * Reorder commands, add headings, and fix typos Co-authored-by: Adam Locke <[email protected]> Co-authored-by: Charlie Arehart <[email protected]>
1 parent c1f889a commit 9d0be14

File tree

1 file changed

+16
-19
lines changed

1 file changed

+16
-19
lines changed

docs/reference/setup/install/docker.asciidoc

Lines changed: 16 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -140,12 +140,12 @@ The following requirements and recommendations apply when running {es} in Docker
140140

141141
The `vm.max_map_count` kernel setting must be set to at least `262144` for production use.
142142

143-
How you set `vm.max_map_count` depends on your platform:
143+
How you set `vm.max_map_count` depends on your platform.
144+
145+
====== Linux
146+
147+
To view the current value for the `vm.max_map_count` setting, run:
144148

145-
* Linux
146-
+
147-
--
148-
The `vm.max_map_count` setting should be set permanently in `/etc/sysctl.conf`:
149149
[source,sh]
150150
--------------------------------------------
151151
grep vm.max_map_count /etc/sysctl.conf
@@ -158,11 +158,12 @@ To apply the setting on a live system, run:
158158
--------------------------------------------
159159
sysctl -w vm.max_map_count=262144
160160
--------------------------------------------
161-
--
162161

163-
* macOS with https://docs.docker.com/docker-for-mac[Docker for Mac]
164-
+
165-
--
162+
To permanently change the value for the `vm.max_map_count` setting, update the
163+
value in `/etc/sysctl.conf`.
164+
165+
====== macOS with https://docs.docker.com/docker-for-mac[Docker for Mac]
166+
166167
The `vm.max_map_count` setting must be set within the xhyve virtual machine:
167168

168169
. From the command line, run:
@@ -172,39 +173,35 @@ The `vm.max_map_count` setting must be set within the xhyve virtual machine:
172173
screen ~/Library/Containers/com.docker.docker/Data/vms/0/tty
173174
--------------------------------------------
174175

175-
. Press enter and use`sysctl` to configure `vm.max_map_count`:
176+
. Press enter and use `sysctl` to configure `vm.max_map_count`:
176177
+
177178
[source,sh]
178179
--------------------------------------------
179180
sysctl -w vm.max_map_count=262144
180181
--------------------------------------------
181182

182183
. To exit the `screen` session, type `Ctrl a d`.
183-
--
184184

185-
* Windows and macOS with https://www.docker.com/products/docker-desktop[Docker Desktop]
186-
+
187-
--
185+
====== Windows and macOS with https://www.docker.com/products/docker-desktop[Docker Desktop]
186+
188187
The `vm.max_map_count` setting must be set via docker-machine:
189188

190189
[source,sh]
191190
--------------------------------------------
192191
docker-machine ssh
193192
sudo sysctl -w vm.max_map_count=262144
194193
--------------------------------------------
195-
--
196194

197-
* Windows with https://docs.docker.com/docker-for-windows/wsl[Docker Desktop WSL 2 backend]
198-
+
199-
--
195+
====== Windows with https://docs.docker.com/docker-for-windows/wsl[Docker Desktop WSL 2 backend]
196+
200197
The `vm.max_map_count` setting must be set in the docker-desktop container:
201198

202199
[source,sh]
203200
--------------------------------------------
204201
wsl -d docker-desktop
205202
sysctl -w vm.max_map_count=262144
206203
--------------------------------------------
207-
--
204+
208205

209206
===== Configuration files must be readable by the `elasticsearch` user
210207

0 commit comments

Comments
 (0)