<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<br>
<br>
<div class="moz-cite-prefix">On 06/06/2017 12:26 PM, Kirk Pepperdine
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:05FF4DD7-5C2A-4061-AD55-E7AB30FAE1C1@kodewerk.com">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<br class="">
<div>
<blockquote type="cite" class="">
<div class="">On Jun 6, 2017, at 7:44 PM, sangheon <<a
href="mailto:sangheon.kim@oracle.com" class=""
moz-do-not-send="true">sangheon.kim@oracle.com</a>>
wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<meta http-equiv="Content-Type" content="text/html;
charset=utf-8" class="">
<div text="#000000" bgcolor="#FFFFFF" class=""> Hi Kirk,<br
class="">
<br class="">
<div class="moz-cite-prefix">On 06/06/2017 01:26 AM, Kirk
Pepperdine wrote:<br class="">
</div>
<blockquote type="cite"
cite="mid:2C20D7DA-2E0C-44B4-B5CB-54201A670279@kodewerk.com"
class="">
<pre class="" wrap="">Hi,
I’m keep running into cases where reference processing dominates the pause times budget (no matter which collector is configured). In all cases configuring parallel reference processing helped enormously. Reference processing is single threaded by default. I’m wondering if there is a reason why reference processing could be parallel by default or parallelized if the workload exceeds a reasonable threshold.</pre>
</blockquote>
The biggest reason that I think is in some cases - if
there are not many references [1]- single thread case is
faster. Of course, this is controversial as choosing a
benchmark will show different results. Probably big enough
applications tend to have many references. But this is why
we don't set 'ParallelRefProcEnabled=true' as a default.<br
class="">
<br class="">
Current implementation spends some time on
starting/stopping worker threads. We start and stop worker
threads 9 times (3 for SoftReference and 2 times for other
types) for reference processing. And this results in
slower than single thread case in some cases. <br
class="">
<br class="">
<a class="issue-link" data-issue-key="JDK-8043575"
href="https://bugs.openjdk.java.net/browse/JDK-8043575"
id="key-val" rel="4726783" moz-do-not-send="true">JDK-8043575</a>
is proposing to dynamically switch between MT and single
thread. And there are other CRs to enhance references
processing.<br class="">
I have a prototype but need more refining. Please keep on
eye on this if you are interested. (Thanks, Aleksey for
the link at the other email thread)<br class="">
<br class="">
[1]: e.g. Most of Specjvm2008 sub-tests don't use
references. Derby is exceptional case that shows over 12k
FinalReferences. So single thread is faster except Derby
case.<br class="">
</div>
</div>
</blockquote>
<div><br class="">
</div>
SpecJVM doesn’t represent the real world. </div>
</blockquote>
Absolutely!<br>
I was trying to answer the reason why ParallelRefProcEnabled is set
to false as a default.<br>
<br>
<blockquote type="cite"
cite="mid:05FF4DD7-5C2A-4061-AD55-E7AB30FAE1C1@kodewerk.com">
<div>In the real world most applications use weak, soft and final
references with a sprinkling of Phantom. I think Aleksey’s link
was most interesting, my bad for not searching the bug database
prior to posting.</div>
<div><br class="">
</div>
<div>Anyways, I don’t mind charging clients a fee to tell them to
turn on this flag but….</div>
</blockquote>
Okay. <br>
I hope <a class="issue-link" data-issue-key="JDK-8043575"
href="https://bugs.openjdk.java.net/browse/JDK-8043575"
id="key-val" rel="4726783">JDK-8043575</a> would help them.<br>
<br>
Thanks,<br>
Sangheon<br>
<br>
<br>
<blockquote type="cite"
cite="mid:05FF4DD7-5C2A-4061-AD55-E7AB30FAE1C1@kodewerk.com">
<div><br class="">
</div>
<div>Kind regards,</div>
<div>Kirk</div>
<div><br class="">
</div>
</blockquote>
<br>
</body>
</html>