[External] : Re: Native methods and virtual threads

Ron Pressler ron.pressler at oracle.com
Fri Jul 14 22:33:12 UTC 2023


Ah yes. Something like that is already on the near-term roadmap.

> On 14 Jul 2023, at 21:17, Alejandro Revilla <apr at jpos.org> wrote:
> 
> I pondered over a simple method to track the count of virtual threads pending assignment.
> 
> I understand we can extract this from JFR (perhaps using event streaming on the same JVM), but a straightforward method, similar to ThreadMXBean's getThreadCount(), could simplify its use.
> 
> --
> @apr
> 
> 
> On Fri, Jul 14, 2023 at 4:51 PM Ron Pressler <ron.pressler at oracle.com> wrote:
> 
> 
> > 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