JVM Heap Advice from documentation

Note that the documentation gives 50% as a recommended upper limit, not a target:

Set Xmx to no more than 50% of your physical RAM

You can of course set it lower. I think that reducing the heap size also reduces the space available for off-heap data (they share a limit) but you are right that it increases the space available for filesystem cache. Would that improve performance? It depends™ :slight_smile: It means a full GC would be faster, but maybe more frequent, and means it can cache less data internally(*). With some workloads this could be a net win. Only proper benchmarking can tell.

(*) Elasticsearch relies on the filesystem cache for fast access to on-disk data but it does have its own caches for other data that isn't kept on-disk.