Query about heap memory consumption of Virtual Thread

Anindya Bandopadhyay anindyabandopadhyay at gmail.com
Sun Aug 28 04:31:39 UTC 2022


Thank you for the clarification.

Regards;
Anindya Bandopadhyay
<http://www.linkedin.com/in/anindyabandopadhyay>


On Thu, 25 Aug 2022 at 22:19, Alan Bateman <Alan.Bateman at oracle.com> wrote:

>
>
> On 25/08/2022 16:54, Ron Pressler wrote:
> > Hi.
> >
> > The stack representation for virtual threads is currently not as
> > compact as we’d like it to be, and we’re now working on reducing it,
> > possibly drastically. So yes, it is possible that the application will
> > require more heap space, but whether that’s the case, or by how much
> > is very much application-dependent, so you’ll need to track the heap
> > usage and allocate heap space appropriately.
> >
> > Virtual threads are lightweight in the sense that they consume much
> > less precious resources than platform threads, and that is why you can
> > have many more of them than platform threads. The resource consumption
> > by platform threads is much more constrained than for virtual threads,
> > even in their current state. We expect the heap consumption to be
> > reduced in a future version.
> >
> Also just to add that the jconsole screen shots are only showing the
> heap memory so you can't see the memory reserved/committed for the 3000+
> platform threads that running in the VM corresponding to the left screen
> shot.
>
> -Alan
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/loom-dev/attachments/20220828/e214d2d9/attachment-0001.htm>


More information about the loom-dev mailing list