Project Loom VirtualThreads hang

Alan Bateman Alan.Bateman at oracle.com
Thu Jan 5 15:28:13 UTC 2023


On 05/01/2023 12:36, robert engels wrote:
> :
>
> The system cpu is < 3% and the idle is < 3%. The system % is much 
> closer to the ideal for a test like this. Somewhat unexpected, but any 
> spinning for locks now has a detrimental effect on performance.:
>
> Can you briefly describe what that runtime option does?
>

The interface for debuggers, profilers, and other tooling is the JVM 
Tool Interface. This is a native interface and poses a number of 
challenges for areas of the runtime that are implemented in Java code 
rather than in the VM. Right now, there are some scalability and 
performance issues with JVMTI when using virtual threads. Work is in 
progress to address some of this. In the mean-time, it means that some 
proifiling tools may impact performance and skew profiles. The XX flag 
disables calls into the VM to notify JVMTI when virtual threads are 
parking/unparking, something that an async profiler probably doesn't 
need. That mechanism also has a mutex in the VM to coordinate the thread 
transitions which I think is the surprising sys time that you saw in the 
original profile.

-Alan


More information about the loom-dev mailing list