-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Description
jstack.txt
jcmd.txt
Spring Boot 3.2.3
Virtual Kafka listeners are tied to a platform thread forever.
The problem I see is that validating with jcmd and jstack the listeners are tied to a platform thread forever.
Therefore it does not make effective use of virtual threads.
Without messages in Kafka and with a concurrency of 20, I have 20 platform threads carrying the virtual threads.
I have 3 cores. Therefore I have to have only 3 ForkJoinPool-1-worker platform threads waiting.
But in reality I have 3 waiting and another 20 carrying the listeners.
[oracle@vtuerto kafka-2602]$ cat jstack.txt | grep -A 1 ForkJoinPool-1-worker | grep WAITING
java.lang.Thread.State: TIMED_WAITING (parking)
java.lang.Thread.State: WAITING (parking)
java.lang.Thread.State: WAITING (parking)
[oracle@vtuerto kafka-2602]$ cat jstack.txt | grep -A 1 ForkJoinPool-1-worker | grep Carrying
Carrying virtual thread #38
Carrying virtual thread #73
Carrying virtual thread #47
Carrying virtual thread #76
Carrying virtual thread #80
Carrying virtual thread #61
Carrying virtual thread #43
Carrying virtual thread #92
Carrying virtual thread #45
Carrying virtual thread #64
Carrying virtual thread #84
Carrying virtual thread #88
Carrying virtual thread #69
Carrying virtual thread #96
Carrying virtual thread #100
Carrying virtual thread #104
Carrying virtual thread #108
Carrying virtual thread #112
Carrying virtual thread #116
Carrying virtual thread #51