I have a Ubuntu server with 4GB RAM. After starting kibana and logstash the server have 2.5GB of available RAM. When i try to start elasticsearch service with -Xms1g -Xmx1g it wont start and log the following 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.
If I try to lower the heap sizes to 512m or lower it will start, after a couple of minutes the service stop with similar error even if I have half of the memory available.
It look like JVM is not using all the available memory.
Any help is appreciated.