From e182067f1fa6dd1e716c9a146177da652f6ce65b Mon Sep 17 00:00:00 2001 From: Adam Locke Date: Thu, 27 Jan 2022 13:45:30 -0500 Subject: [PATCH] Clarify commands shown for "permanently" setting max_map_count (#82345) (#83227) * 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 Co-authored-by: Charlie Arehart --- docs/reference/setup/install/docker.asciidoc | 35 +++++++++----------- 1 file changed, 16 insertions(+), 19 deletions(-) diff --git a/docs/reference/setup/install/docker.asciidoc b/docs/reference/setup/install/docker.asciidoc index 713298018f255..43375b63c6619 100644 --- a/docs/reference/setup/install/docker.asciidoc +++ b/docs/reference/setup/install/docker.asciidoc @@ -356,12 +356,12 @@ The following requirements and recommendations apply when running {es} in Docker The `vm.max_map_count` kernel setting must be set to at least `262144` for production use. -How you set `vm.max_map_count` depends on your platform: +How you set `vm.max_map_count` depends on your platform. + +====== Linux + +To view the current value for the `vm.max_map_count` setting, run: -* Linux -+ --- -The `vm.max_map_count` setting should be set permanently in `/etc/sysctl.conf`: [source,sh] -------------------------------------------- grep vm.max_map_count /etc/sysctl.conf @@ -374,11 +374,12 @@ To apply the setting on a live system, run: -------------------------------------------- sysctl -w vm.max_map_count=262144 -------------------------------------------- --- -* macOS with https://docs.docker.com/docker-for-mac[Docker for Mac] -+ --- +To permanently change the value for the `vm.max_map_count` setting, update the +value in `/etc/sysctl.conf`. + +====== macOS with https://docs.docker.com/docker-for-mac[Docker for Mac] + The `vm.max_map_count` setting must be set within the xhyve virtual machine: . From the command line, run: @@ -388,7 +389,7 @@ The `vm.max_map_count` setting must be set within the xhyve virtual machine: screen ~/Library/Containers/com.docker.docker/Data/vms/0/tty -------------------------------------------- -. Press enter and use`sysctl` to configure `vm.max_map_count`: +. Press enter and use `sysctl` to configure `vm.max_map_count`: + [source,sh] -------------------------------------------- @@ -396,11 +397,9 @@ sysctl -w vm.max_map_count=262144 -------------------------------------------- . To exit the `screen` session, type `Ctrl a d`. --- -* Windows and macOS with https://www.docker.com/products/docker-desktop[Docker Desktop] -+ --- +====== Windows and macOS with https://www.docker.com/products/docker-desktop[Docker Desktop] + The `vm.max_map_count` setting must be set via docker-machine: [source,sh] @@ -408,11 +407,9 @@ The `vm.max_map_count` setting must be set via docker-machine: docker-machine ssh sudo sysctl -w vm.max_map_count=262144 -------------------------------------------- --- -* Windows with https://docs.docker.com/docker-for-windows/wsl[Docker Desktop WSL 2 backend] -+ --- +====== Windows with https://docs.docker.com/docker-for-windows/wsl[Docker Desktop WSL 2 backend] + The `vm.max_map_count` setting must be set in the docker-desktop container: [source,sh] @@ -420,7 +417,7 @@ The `vm.max_map_count` setting must be set in the docker-desktop container: wsl -d docker-desktop sysctl -w vm.max_map_count=262144 -------------------------------------------- --- + ===== Configuration files must be readable by the `elasticsearch` user