I am a windows user. I installed Windows Subsystem for Linux [wsl2] and then installed docker using it. Then I tried to get started with OpenSearch so I followed the documentation in the given link Opensearch 2.11.1 · OpenSearch and run docker-compose up, In the shell, I am getting an error message like
Hi Now I am able to run opensearch dashboard by running two commands
wsl -d docker-desktop
sysctl -w vm.max_map_count=262144 parallelly running with docker-compose up command. I dont know what the two commands are doing exactly. Can somebody explain me, since these are also not found in any documentations.
I got these from a youtube video.
wsl -d docker-desktop is instantiating a “Windows Subsystem for Linux” terminal and specifying that the distribution to be instantiated is docker-desktop. This WSL distro gets installed when you’re using docker for windows and configure it to use the WSL backend.
Inside of that shell, it’s executing sysctl -w vm.max_map_count=262144
This file contains the maximum number of memory map areas a process
may have. Memory map areas are used as a side-effect of calling
malloc, directly by mmap, mprotect, and madvise, and also when loading
shared libraries.
While most applications need less than a thousand maps, certain
programs, particularly malloc debuggers, may consume lots of them,
e.g., up to one or two maps per allocation.
The default value is 65536.
You’re basically raising the amount of memory that the OpenSearch docker container is allowed to ‘map’ to itself.