[External] : Re: Native methods and virtual threads

Alejandro Revilla apr at jpos.org
Fri Jul 14 20:17:44 UTC 2023


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 <http://twitter.com/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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/loom-dev/attachments/20230714/e14b46ea/attachment.htm>


More information about the loom-dev mailing list