Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why does Elasticsearch use 9 GB of memory, with default settings?

I have just downloaded and run Elasticsearch on my Windows 10 PC. I have not changed any settings, everything is default. The software is running and I can access it on port 9200. However, it appears to be consuming about 9 GB RAM.

I have nothing stored in it, nothing is indexed, it's a default setup.

Why does Elasticsearch need so much memory by default?


EDIT: It's the latest version, 8.1.2.

like image 385
HibernatePro1337 Avatar asked Oct 24 '25 02:10

HibernatePro1337


1 Answers

Elasticsearch latest version(8.1.2 in your case), comes with the bundled JDK and default settings, Elasticsearch default heap settings is 50% of RAM allocated to the machine, it looks like your machine RAM is ~20 Gig, if you want to change this settings, you can follow the steps given in the official jvm options document.

Note: You should allocate 50% of machine RAM to Elasticsearch heap if you running it in Production but it shouldn't cross the ~30 GB in any case.

like image 133
Amit Avatar answered Oct 26 '25 17:10

Amit