<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
Hi Kirk,<br>
<br>
<div class="moz-cite-prefix">On 06/06/2017 01:26 AM, Kirk Pepperdine
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:2C20D7DA-2E0C-44B4-B5CB-54201A670279@kodewerk.com">
<pre 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>
<br>
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>
<br>
<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> is proposing to
dynamically switch between MT and single thread. And there are other
CRs to enhance references processing.<br>
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>
<br>
[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>
<br>
Thanks,<br>
Sangheon<br>
<br>
<br>
<blockquote type="cite"
cite="mid:2C20D7DA-2E0C-44B4-B5CB-54201A670279@kodewerk.com">
<pre wrap="">
Kind regards,
Kirk Pepperdine
</pre>
</blockquote>
<br>
</body>
</html>