Some Tipps for Elasticsearch (Upgrader from 7 to 8)

Good Morning!

I recently upgraded my elasticsearch from 7.x to 8.11 since i have read this information:

First thing i have been mistaken to let the old plugin installed so i started new by removing it

/usr/share/elasticsearch/bin/elasticsearch-plugin remove ingest-attachment

So after that i re-installed the elasticsearch, tesseract etc. and implemented the new “imediate upgrader” by


see: Nextcloud Volltextsuche mit Elasticsearch 8 - Carsten Rieger IT-Services

So my question:
What performance tips do you have e.g. for the
/etc/elasticsearch/jvm.options file

I have a RAM consumtion of 10G (whole Server has 18 G RAM) and set the java option to

# Xms represents the initial size of total heap space
# Xmx represents the maximum size of total heap space


Is this value too high? I had set it to 4g but i got curl errors so i increased the values following this article

Does anyone have proposals for elastic search configuration?
My fulltextsearch is also set to search in groupfolders (big ones with tons of files - pdf, txt, epub, jpg, etc.)

A further question:

in the meantime i made two updates to elasticsearch via apt (daily update check)
and saw that every update my settings in the java options where overwritten.

Is there any solution to avoid loosing settings by updates?