Native memory allocation (mmap) failed to map 1073741824 bytes for committing reserved memory

OS :
NAME=“CentOS Linux”
VERSION=“8 (Core)”
ID=“centos”
ID_LIKE=“rhel fedora”
VERSION_ID=“8”
PLATFORM_ID=“platform:el8”
PRETTY_NAME=“CentOS Linux 8 (Core)”
ANSI_COLOR=“0;31”
CPE_NAME=“cpe:/o:centos:centos:8”
HOME_URL=“https://www.centos.org/
BUG_REPORT_URL=“https://bugs.centos.org/

Kernel: Linux 4.18.0-193.28.1.el8_2.x86_64

version : opendistroforelasticsearch.noarch 1.10.1-1

when i trying to installing opendistroforelasticsearch is getting failed, it shows below error:

There is insufficient memory for the Java Runtime Environment to continue.

Native memory allocation (mmap) failed to map 1073741824 bytes for committing reserved memory.

Possible reasons:

The system is out of physical RAM or swap space

The process is running with CompressedOops enabled, and the Java Heap may be blocking the growth of the native heap

Possible solutions:

Reduce memory load on the system

Increase physical memory or swap space

Check if swap backing store is full

Decrease Java heap size (-Xmx/-Xms)

Decrease number of Java threads

Decrease Java thread stack sizes (-Xss)

Set larger code cache with -XX:ReservedCodeCacheSize=

JVM is running with Unscaled Compressed Oops mode in which the Java heap is

placed in the first 4GB address space. The Java Heap base address is the

maximum limit for the native heap growth. Please use -XX:HeapBaseMinAddress

to set the Java Heap base and to place the Java Heap above 4GB virtual address.

This output file may be truncated or incomplete.

Out of Memory Error (os_linux.cpp:2908), pid=37391, tid=37392

JRE version: (14.0.1+7) (build )

Java VM: OpenJDK 64-Bit Server VM (14.0.1+7, mixed mode, tiered, compressed oops, g1 gc, linux-amd64)

Core dump will be written. Default location: Core dumps may be processed with “/usr/lib/systemd/systemd-coredump %P %u %g %s %t %c %h %e” (or dumping to /usr/share/elasticsearch/core.37391)

Thanks

Hi @pechettibhaskar,

Can you try the below setting to see if that works?

sysctl -w vm.max_map_count=262144

More info
Thanks!