hsperfdata causing long GC/safepoint times: Don't use mmap?

Evan Jones ejones at twitter.com
Thu Mar 26 15:14:20 UTC 2015

At Twitter, I recently discovered that the hsperfdata file that is created
by default by the JVM causes long safepoint and GC pauses. It turns out
that writes to mmap-ed files can block until disk I/O completes, even if
the I/O is to another disk. For details see:

We have been experimenting with adding the -XX:+PerfDisableSharedMem JVM
flag on a number of our latency sensitive services, and have seen a
significant improvement. Our JVM team (which I am *not* part of), is
investigating potential changes to the JVM to prevent this.

Any suggestions for an approach to solving this problem that could be
accepted into Hotspot itself? Some options:

* Make the location of this file configurable (this was set with
java.io.tmpdir for a time, but then was reverted; see

* Use shared memory that is not backed by a file?

* Something else I'm not considering?


Evan Jones

More information about the hotspot-runtime-dev mailing list