<!DOCTYPE html><html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
Hi Misha,<br>
<br>
<div class="moz-cite-prefix">On 2025-04-21 23:49, Misha Dmitriev
wrote:<br>
</div>
<blockquote type="cite" cite="mid:SA6PR21MB44372F066685E20FF216E764C2B82@SA6PR21MB4437.namprd21.prod.outlook.com">
<style type="text/css" style="display:none;">P {margin-top:0;margin-bottom:0;}</style>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Hi ZGC team,</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Are there any plans at this time to enable emission of Thread
Stall events through MXBeans? We all know that ZGC
stop-the-world GC pauses are normally very short. But we've
noticed that for real apps at LinkedIn, thread stalls can
sometimes be really long (up to a few sec), and apparently, they
may affect latencies very noticeably at times. Thus, any system
that monitors ZGC performance needs to track both types of GC
events. We currently achieve that in some of our monitoring
systems through gc.log parsing in real time, but MXBeans may
have some advantages in some situations.</div>
</blockquote>
<br>
Just to be sure we are on the same page, when you are saying Thread
Stall events are you referring to what we call Allocation Stalls,
where Java threads are waiting for the GC to reclaim memory? Or are
referring to all kinds of stall that could block the threads?<br>
<br>
We don't have any plans to add more MXBeans to ZGC, but maybe we
should? Nowadays we tend to send events through JFR instead, and I
don't see much new development of features with MXBeans in the JVM.
I'll bring question up with the Serviceability team.<br>
<br>
If JFR would work for you, we do have the ZAllocationStall event
that gets sent every time we hit an allocation stall. Maybe this
together with the newish JFR streaming API would be enough to
monitor these stalls? See: <a class="moz-txt-link-freetext" href="https://openjdk.org/jeps/349">https://openjdk.org/jeps/349</a><br>
<br>
Cheers,<br>
StefanK<br>
<br>
<blockquote type="cite" cite="mid:SA6PR21MB44372F066685E20FF216E764C2B82@SA6PR21MB4437.namprd21.prod.outlook.com">
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
The same question is valid for Shenandoah as well.</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Thanks,</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Misha<br>
</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
</div>
</blockquote>
<br>
</body>
</html>