I am using TheadPoolExecutor that executes on a PriorityQueue. I have set a minimum pool size of 5 and max of 50. When we ran the load test, we saw like 10% jump is CPU. The thread dump shows
pool-1-thread-5" prio=3 tid=0x020f69a0 nid=0xa3 waiting on condition [0xb517f000..0xb517f970] at sun.misc.Unsafe.park(Native Method) at java.util.concurrent.locks.LockSupport.park(LockSupport.java:118) at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1841) at java.util.concurrent.PriorityBlockingQueue.take(PriorityBlockingQueue.java:200) at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:470) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675) at java.lang.Thread.run(Thread.java:595)
Wondering the prestartAllCoreThreads() that I use in ThreadPoolExecutor will have any performance issue?
TIA