Hi Ben,

In the course of a tuning exercise to decruft a Cassandra installation
> infected with "Tuning By Folklore" hacks, I found this beauty.
>
> The folklore suggests setting the JVM flag -XX:+PerfDisableSharedMem
> as per http://www.evanjones.ca/jvm-mmap-pause.html (tl;dr Writing some
> hsperfdata memory statistics can block against kernel performing disk
> I/O). Setting the flag is intended to reduce large outliers in the GC
> tail and other gremlins (because this contention can occur during any
> safepoint operation).
>
> All seems reasonable so far.
>
> Reading the comments and doing some other detective work leads to the
> possibility that the lazytime Linux mount option may remove the need
> to set the option, by removing the contention.
>
> However, there appears to be no direct confirmation of this, and,
> rather amusingly, the combination of search terms "lazytime
> PerfDisableSharedMem" produces no Google results at all - not
> something I thought I'd ever see in the year 2019.
>
> Any thoughts or pointers gratefully received.
>

I've not tested but I don't think it would solve the problem. To the best
of my knowledge Lazytime just reduces the overhead from tracking filesystem
metadata timestamps when doing disk I/O. So I'm sure it would reduce the
pausetime from writing hsperf data, but you're still going to get latency
from doing the actual write of the hsperfdata contents.

If you want things that connect to a JVM via hsperfdata (like VisualVM) to
connect without the pause issues then your best bet is to mount /tmp using
tmpfs. Yes, I know it sounds like this should be the default but it isn't
on Ubuntu / Debian. Or if you don't want to switch your entire /tmp to
tmpfs for memory consumption reasons then you could run your JVM in a
container and bind-mount it's /tmp to /dev/shm which will be tmpfs.

regards,

  Richard Warburton

  http://insightfullogic.com
  @RichardWarburto <http://twitter.com/richardwarburto>

-- 
You received this message because you are subscribed to the Google Groups 
"mechanical-sympathy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web, visit 
https://groups.google.com/d/msgid/mechanical-sympathy/CAMaYbvJvRn4iE2%3DC03e8kVG76jpfEv3S2ySotaE3T%2BRh5%2BenCQ%40mail.gmail.com.

Reply via email to