Chris,

I did set -Djdk.tracePinnedThreads=full and found there were a few pinned 
threads:


Thread[#43,ForkJoinPool-1-worker-4,5,CarrierThreads]

    
java.base/java.lang.VirtualThread$VThreadContinuation.onPinned(VirtualThread.java:185)

    java.base/jdk.internal.vm.Continuation.onPinned0(Continuation.java:393)

    java.base/java.lang.VirtualThread.parkNanos(VirtualThread.java:631)

    java.base/java.lang.System$2.parkVirtualThread(System.java:2648)

    java.base/jdk.internal.misc.VirtualThreads.park(VirtualThreads.java:67)

    
java.base/java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:408)

…

    
com.mysql.cj.protocol.FullReadInputStream.readFully(FullReadInputStream.java:64)

    
com.mysql.cj.protocol.a.SimplePacketReader.readHeaderLocal(SimplePacketReader.java:81)

…

    com.mysql.cj.jdbc.ConnectionImpl.setAutoCommit(ConnectionImpl.java:2005) 
<== monitors:1

    
com.zaxxer.hikari.pool.ProxyConnection.setAutoCommit(ProxyConnection.java:401)

    
com.zaxxer.hikari.pool.HikariProxyConnection.setAutoCommit(HikariProxyConnection.java)

…

Over the 12 test runs I have performed, I found a 53% decrease in throughput 
when using virtual threads: 
http://ec2-18-188-185-212.us-east-2.compute.amazonaws.com:8080/web-report/

My example code is located here: https://github.com/wcrowell/rest-mysql-app/

The JMX test I used is located here: 
https://github.com/wcrowell/rest-mysql-app/blob/main/virtual-thread-test.jmx

This test makes a POST request to save a record to MySQL: 
http://ec2-18-117-196-158.us-east-2.compute.amazonaws.com:8080/vt/save

Regards,

William Crowell


This e-mail may contain information that is privileged or confidential. If you 
are not the intended recipient, please delete the e-mail and any attachments 
and notify us immediately.

Reply via email to