Reputation: 2060
I am using Java Mission Control to profile my application for performance issues. JMC has highlighted java.io.PrintStream under Thread Contention and Lock Instances sections.
Why am I facing thread contention issues for JDK package?
Upvotes: 6
Views: 364
Reputation: 6197
It looks like your application is producing a lot of output to stdout or stderr from several threads concurrently (System.out
and System.err
are PrintStream
s). Writes and flushes on a PrintStream
cannot be processed in parallel, they are all synchronized, so you're facing contention.
Upvotes: 7