ForkJoinTask[] instances

Dr Heinz M. Kabutz heinz at javaspecialists.eu
Fri Nov 20 09:33:17 UTC 2020


Good morning from Crete,

I started an experiment 11 days ago with 2 million virtual threads in 
one JVM sending ping messages to another 2 million virtual threads in 
another JVM. It has been happily humming along. When looking at it this 
morning, I noticed in the class histogram that 
[Ljava.util.concurrent.ForkJoinTask; appeared higher on the list than I 
had expected.

On the JVM that has 2 million client threads:

  num     #instances         #bytes  class name (module)
-------------------------------------------------------
    1:       1999997     1453773944  jdk.internal.misc.StackChunk 
(java.base at 16-internal)
    2:          7169     1302840336 [Ljava.util.concurrent.ForkJoinTask; 
(java.base at 16-internal)

On the JVM that has 2 million server threads:

  num     #instances         #bytes  class name (module)
-------------------------------------------------------
    1:       2000000      820706112  jdk.internal.misc.StackChunk 
(java.base at 16-internal)
    2:       2000000      304000000  java.lang.VirtualThread 
(java.base at 16-internal)
    3:       2000000      208000000  java.lang.VirtualThread$1 
(java.base at 16-internal)
    4:       2000000      160000000  sun.nio.ch.NioSocketImpl 
(java.base at 16-internal)
    5:       1999999      143999928 
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask 
(java.base at 16-internal)
    6:            28      134230464 [Ljava.util.concurrent.ForkJoinTask; 
(java.base at 16-internal)

Has anyone else noticed this?

Regards

Heinz
-- 
Dr Heinz M. Kabutz (PhD CompSci)
Author of "The Java™ Specialists' Newsletter" - www.javaspecialists.eu
Java Champion - www.javachampions.org
JavaOne Rock Star Speaker
Tel: +30 69 75 595 262
Skype: kabutz



More information about the loom-dev mailing list