Hi Nicklas,
Thats right, WAITING thread will not consume CPU.
What are below threads? Trying to read from DB at same time, might be due to slow connection or its long read which is increasing CPU utilization.
17- Thread trying to read from DB
java.lang.Thread.State: RUNNABLE
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.socketRead(SocketInputStream.java:116)
at java.net.SocketInputStream.read(SocketInputStream.java:170)
at java.net.SocketInputStream.read(SocketInputStream.java:141)
at org.postgresql.core.VisibleBufferedInputStream.readMore(VisibleBufferedInputStream.java:143)
at org.postgresql.core.VisibleBufferedInputStream.ensureBytes(VisibleBufferedInputStream.java:112)
at org.postgresql.core.VisibleBufferedInputStream.read(VisibleBufferedInputStream.java:70)
at org.postgresql.core.PGStream.receiveChar(PGStream.java:283)
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1919)
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:291)
- locked <564a9d11> (a org.postgresql.core.v3.QueryExecutorImpl)
Below thread are 8-Thread, these does not looks problem but you can check
java.lang.Thread.State: RUNNABLE
at sun.nio.ch.WindowsSelectorImpl$SubSelector.poll0(Native Method)
at sun.nio.ch.WindowsSelectorImpl$SubSelector.poll(WindowsSelectorImpl.java:296)
at sun.nio.ch.WindowsSelectorImpl$SubSelector.access$400(WindowsSelectorImpl.java:278)
at sun.nio.ch.WindowsSelectorImpl.doSelect(WindowsSelectorImpl.java:159)
at sun.nio.ch.SelectorImpl.lockAndDoSelect(SelectorImpl.java:86)
- locked <7f73e942> (a sun.nio.ch.Util$3)
Regards,
Alkesh Barot
Adv leave notification:
Thanks for the reply. On closer inspection, I'm not actually sure if I interpreted the graphs correctly. There is no noticeable DB load, they might just be waiting but I'm not sure on what. Shouldn't the threads just block if they're waiting for a lock? I can't see any reasonable explanation for the 100% CPU load