Experience using virtual threads in EA 23-loom+4-102
Alan Bateman
Alan.Bateman at oracle.com
Tue Jun 25 11:15:04 UTC 2024
On 24/06/2024 18:24, Matthew Swift wrote:
> :
>
>
>
> I reran the test and executed the above command once per second for 10
> seconds:
>
> $ for i in 1 2 3 4 5 6 7 8 9 10; do jcmd DirectoryServer
> Thread.vthread_scheduler; sleep 1; done
> 110886:
> java.util.concurrent.ForkJoinPool at 3a7204cd[Running, parallelism = 20,
> size = 20, active = 13, running = 0, steals = 17676052, tasks = 0,
> submissions = 0]
> 110886:
> java.util.concurrent.ForkJoinPool at 3a7204cd[Running, parallelism = 20,
> size = 20, active = 16, running = 0, steals = 17784106, tasks = 1,
> submissions = 0]
> 110886:
> java.util.concurrent.ForkJoinPool at 3a7204cd[Running, parallelism = 20,
> size = 20, active = 20, running = 1, steals = 17887000, tasks = 1,
> submissions = 0]
> 110886:
> java.util.concurrent.ForkJoinPool at 3a7204cd[Running, parallelism = 20,
> size = 20, active = 15, running = 1, steals = 17984238, tasks = 1,
> submissions = 0]
> 110886:
> java.util.concurrent.ForkJoinPool at 3a7204cd[Running, parallelism = 20,
> size = 20, active = 9, running = 0, steals = 18082247, tasks = 0,
> submissions = 0]
> 110886:
> java.util.concurrent.ForkJoinPool at 3a7204cd[Running, parallelism = 20,
> size = 20, active = 9, running = 0, steals = 18201916, tasks = 0,
> submissions = 0]
> 110886:
> java.util.concurrent.ForkJoinPool at 3a7204cd[Running, parallelism = 20,
> size = 20, active = 20, running = 0, steals = 18302449, tasks = 2,
> submissions = 0]
> 110886:
> java.util.concurrent.ForkJoinPool at 3a7204cd[Running, parallelism = 20,
> size = 20, active = 1, running = 0, steals = 18416910, tasks = 0,
> submissions = 0]
> 110886:
> java.util.concurrent.ForkJoinPool at 3a7204cd[Running, parallelism = 20,
> size = 20, active = 13, running = 0, steals = 18516576, tasks = 0,
> submissions = 0]
> 110886:
> java.util.concurrent.ForkJoinPool at 3a7204cd[Running, parallelism = 20,
> size = 20, active = 14, running = 0, steals = 18602916, tasks = 0,
> submissions = 0]
>
> I won't pretend to understand what this means :-)
>
Thanks, I mostly wanted to see the values for the "tasks" and
"submissions" in the output. These are the number of virtual threads
that are waiting to execute in both local queues and unowned submission
queues. There are 0, except for the sample where all 20 workers are
active and 2 virtual threads have been unparked and are waiting to
continue. So that doesn't explain the outliers you see.
-Alan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/loom-dev/attachments/20240625/c11625b2/attachment.htm>
More information about the loom-dev
mailing list