I did some performance testing with virtual threads on Apache Tomcat 11.0.0-M10 and JDK 21 (21+35-2513). I have a simple REST service using Spring 6.0.11 that does an insert into MySQL 8.0.32.
I have 3 separate boxes all running Rocky Linux 9.2 on AWS (t3a.xlarge which is 4 vCPUs and 16GiB RAM): 1) An application server running Tomcat 11.0.0-M10 with JDK 21 2) MySQL 8.0.32 3) JMeter 5.6.2 I know that JDK 21 is nowhere near GA, but I got some interesting results. I did 10 test runs with useVirtualThreads=“true”, and 10 test runs without virtual threads (the default). Each run used 1000 threads in JMeter for about 3 minutes and 20 seconds for a ramp up time of 3 seconds. What I found was using platform threads performed at least twice as fast as virtual threads. Maybe I am interpreting the results wrong, but this is what I found consistently across each test. Again, I realize that performance is not the only goal of virtual threads. Just my observations. 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.