-
Bug
-
Resolution: Unresolved
-
Minor
-
None
The support core helpfully dumps a cpu useage along with thread info
jenkins.util.Timer 1 id=37 (0x25) state=WAITING cpu=90%
However this cpu usage is the time spent in cpu / time spent in user mode.
So all this shows is the %age of time spent in user mode vs system mode .
When reading the dump this is not obvious and can lead to confusing interpretations.
e.g. a remote channel pinger thread will appear to be spinning by using 100% cpu.
Ping thread for channel hudson.remoting.Channel@01234567:SomeComputer id=123 (0x25e) state=TIMED_WAITING cpu=100% at java.lang.Thread.sleep(Native Method) at hudson.remoting.PingThread.run(PingThread.java:91)
whereas in reality this has just spent 100% of the time when the thread was active in user mode.
what is more interesting is the amount of time the thread has spent running vs not running.
e.g. the ratio of running time to blocked + waiting time (obtainable sometimes from the ThreadInfo ) This would actually allow you to see Threads that where spinning or heavily loaded - as opposed to ones spending their time in userland vs kernel land.
- links to