Experience of adding JDK21 virtual thread support to a DB application
Alan Bateman
Alan.Bateman at oracle.com
Fri Jun 21 18:45:21 UTC 2024
On 21/06/2024 16:57, Matthew Swift wrote:
> :
>
> These results are on my laptop (Intel i9-13900H with 10 cores, Linux
> 6.5, JDK 21.0.3), but we see similar regressions on larger older
> machines in our labs. Also worthy of note is that the context
> switching rate increases from around 180K/s when using synchronized()
> to 300K/s when using ReentrantLock. I know that ReentrantLock is
> supposed to be a little bit less efficient in highly contended
> situations, but I was surprised by an 8-10% impact. Is that expected?
One thing that might be part of this is that a contented monitor enter
does a small amount of spinning. Sergey Kuksenko may have some comments
on this as he has some proposals on this at one point.
-Alan
More information about the loom-dev
mailing list