<div dir="ltr"><div dir="ltr">Am Di., 10. Okt. 2023 um 15:56 Uhr schrieb Alan Bateman <<a href="mailto:Alan.Bateman@oracle.com">Alan.Bateman@oracle.com</a>>:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div>There's a table of system properties in the java.lang.Thread javadoc
with the configuration, you probably want
-Djdk.virtualThreadScheduler.maxPoolSize=<N> for your testing.
It's hard to know what to take from your mail as virtual thread are
only going to help if most of the time is spent blocking at the
queue, the compilation and class generation tasks seem very compute
bound.<br></div></blockquote><div><br></div><div> [When I wrote nosmp in my original mail I meant nosm*t*. I just found out that nosmp is also a thing, and was utterly confused to have just a single core all of a sudden.]</div><br>Timings for 20 back to back iterations inside a bash for loop of `java -Djdk.virtualThreadScheduler.maxPoolSize=n ...` gives me this:<br><br>## without nosmt<br><br>n=20 (matching logical core count)<br>real 29.57<br>user 265.08<br>sys 8.32<br><br>n=12<br>real 29.40<br>user 261.99<br>sys 8.08<br><br>## with nosmt<br><br>n=20<br>real 24.04<br>user 125.19<br>sys 4.86<br><br>n=12 (matching logical core count)<br>real 24.05<br>user 125.55<br>sys 4.67<br><br>maxPoolSize doesn't seem to make much of a difference with regard to real, user, or sys time. To rule out a typo on my part I also ran with n=2, which promptly deadlocked my compiler.<br><br>But the difference between "no nosmt" and "nosmt" becomes even more pronounced when looking at the user and sys times, way beyond the real time's speedup of 1.2.<br></div><div class="gmail_quote"><br></div><div class="gmail_quote">-- mva</div><div class="gmail_quote"><br></div></div>