Thread-Local Handshakes slowdown on single-cpu machines

Karakó Miklós palacsint at palacsint.hu
Tue Apr 28 11:04:44 UTC 2020


Hello David,

I've tried with OpenJDK 15 EA Build 20. Unfortunately it's slow as with 
OpenJDK14.
A colleague of mine set CPU affinity with taskset to only one CPU on 
Linux and did not experience the slowdown. So the issue seems 
Windows-related.

Miklos

On 4/28/20 1:02 AM, David Holmes wrote:
> Hi Miklos,
>
> On 28/04/2020 7:26 am, Karakó Miklós wrote:
>> Hello,
>>
>> We bumped into a possible Thread-Local Handshakes issue with multiple 
>> apps. It seems that enabled TLH slows down applications running on 
>> (although rare) single CPU boxes. I would be grateful if you could 
>> confirm that this is a known trade-off for these rare setups or a 
>> possible JVM bug. That would save us at least a few hours of debugging.
>>
>> TL;DR: Both tested apps stop frequently around "HandshakeOneThread", 
>> "HandshakeAllThreads" and "Revoked bias of currently-unlocked object" 
>> running with OpenJDK12/OpenJDK13/OpenJDK14. OpenJDK 13 with 
>> -XX:-ThreadLocalHandshakes fixes the issue. Adding a second CPU to 
>> the virtual machine fixes the issue. Enabling hyper-threading fixes 
>> the issue.
>
> Can you try with latest JDK 15 build, just to see if this may be 
> something already addressed?
>
> Thanks,
> David
>
>> More details are available at StackOverflow: 
>> https://stackoverflow.com/questions/61375565/slow-application-frequent-jvm-hangs-with-single-cpu-setups-and-java-12 
>>
>>
>> All thoughts are welcome.
>>
>> Best,
>> Miklos
>>



More information about the hotspot-dev mailing list