[External] : Re: Native methods and virtual threads

Ron Pressler ron.pressler at oracle.com
Fri Jul 14 19:51:02 UTC 2023



> On 14 Jul 2023, at 19:51, Alejandro Revilla <apr at jpos.org> wrote:
> 
> Thank you for coming back.
> 
> Answering your question, I think it would be great to have a way to know how many virtual threads are waiting for a platform thread in order to be pinned,

I don’t understand.

> perhaps through ThreadMXBean or equivalent.

Our primary avenue for monitoring these days is JFR.

> In relation to my initial proposition, I overlooked the jdk.virtualThreadScheduler.maxPoolSize property, which could assist in my scenario. However, it seems to be capped at 256 unless parallelism is also set. I'm apprehensive about meddling with these internal ergonomics without the requisite expertise, as it may lead me into a tricky situation. Sounds like those kinds of properties you can change if you know what you're doing, which unfortunately is not the case :)

I agree.

— Ron


More information about the loom-dev mailing list