<!DOCTYPE html><html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
On 12/01/2024 12:29, 何品(虎鸣) wrote:<br>
<blockquote type="cite" cite="mid:271a4d5d-a889-4830-a317-6ab547c03fb4.hepin.p@alibaba-inc.com">
<div class="__aliyun_email_body_block">
<div style="line-height:1.7;font-family:Tahoma,Arial,STHeiti,SimSun;font-size:14.0px;color:#000000;">
<div style="clear:both;"><br>
</div>
<div style="clear:both;">Hi I know, it was suggested that not
pooling the <span>VirtualThread, when I replace my old
executors to use the fancy new
`VirtualThreadExecutorFactory` and with the </span></div>
<div style="clear:both;"><span><span>`jdk.virtualThreadScheduler.maxPoolSize`
set to 2500</span></span></div>
<div style="clear:both;"><span><span><br>
</span></span></div>
<div style="clear:both;"><span><span>after some load testing
and the thread size grow to <span>2205 </span></span></span></div>
<div style="clear:both;"><span><span><span><br>
</span></span></span></div>
<div style="clear:both;">and even the stress testing is
removed from the system , the thread never adjust to a
smaller one. </div>
<br>
</div>
</div>
</blockquote>
There are changes in JDK 22 [1] so that trimming happens a lot more
quickly when the pool is idle.<br>
<br>
-Alan<br>
<br>
[1] <a class="moz-txt-link-freetext" href="https://bugs.openjdk.org/browse/JDK-8319662">https://bugs.openjdk.org/browse/JDK-8319662</a><br>
</body>
</html>