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.
CodePudding user response:
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.