Is there any way to restrict the size of the java heap dump in Elasticsearch

An (uncompressed) heap dump is going to be about the size of the heap as specified by -Xmx, so the most accurate way to control its size is to set that parameter. You can also try compressing it with the -XX:HeapDumpGzipLevel JVM option, which typically saves quite some space but is less predictable.

1 Like