Diagnosing a Jenkins process using 100% of CPU?

2,922 views
Skip to first unread message

Mark Waite

unread,
Apr 25, 2013, 12:02:20 PM4/25/13
to jenkin...@googlegroups.com
While testing the Jenkins 1.509.1 release candidate on a Windows 7 laptop (4 GB RAM, ample disc space, etc.), I found that after running a few jobs, even with Jenkins idle and preparing for shutdown, the Jenkins process was still using 100% of the available CPU capacity.  I've seen similar behaviors before and never bothered to investigate the root cause.

It is a Windows machine, so the leap second related Linux kernel bug mentioned in [1] and [2] do not apply.

Any suggestions on preferred techniques to diagnose high CPU usage by the Jenkins master server on Windows?

I think I can replicate the same condition on Linux, if diagnosis is easier on Linux.  I saw mention of a "kill -3 PID" technique to look at job state.  Is there anything more refined to identify bottlenecks?

Thanks!
Mark Waite


Jesse Glick

unread,
Apr 25, 2013, 2:02:32 PM4/25/13
to jenkin...@googlegroups.com
On 04/25/2013 12:02 PM, Mark Waite wrote:
> Any suggestions on preferred techniques to diagnose high CPU usage by the Jenkins master server on Windows?

jstack

Jesse Glick

unread,
Apr 25, 2013, 2:03:35 PM4/25/13
to jenkin...@googlegroups.com
On 04/25/2013 02:02 PM, Jesse Glick wrote:
> jstack

Or jvisualvm, if the problem is not apparent from a single thread dump and you need to dig deeper into GC cycles, snapshot or instrumented profiling, etc.

Baptiste Mathus

unread,
Apr 26, 2013, 2:48:19 AM4/26/13
to jenkin...@googlegroups.com

Yup.
+Analyze your gc logs. And if you didn't activate it yet, then just do it now (btw this is something that should generally be done even on prod system, recommended by Kirk Pepperdine, not only me ;)).

Cheers

Reply all
Reply to author
Forward
0 new messages