Last modified: 2013-12-17 20:05:59 UTC
Created attachment 12076 [details] jstack trace taken while Jenkins is busy reading files Whenever restart Jenkins it takes roughly half an hour to start up. Running strace on the process it is reading all the build histories. I have attached a jstack taken during startup. An interesting thread is 25437. So I guess whenever Jenkins start a project, it ends up reading all the build history for all projects which is definitively a slow operation given the number of builds logs we keep.
Seems like upstream has been working on it recently. The issue https://issues.jenkins-ci.org/browse/JENKINS-8754 "Improve Start-up Time" has some information about it. 1.485 seems to implements lazy loading. So I guess we will get it with the next LTS release.
Jenkins 1.509.1 (LTS) still has the issue.
Upstream bug is https://issues.jenkins-ci.org/browse/JENKINS-17837
Maybe it is related to the Downstream buildview plugin which is reference jstack traces. https://wiki.jenkins-ci.org/display/JENKINS/Downstream+buildview+plugin
I have removed the downstream-buildview plugin. That was triggered a full parse of all the build history! The Jenkins upgraded did add the Lazy Loading system. We are safe now, Jenkins restarts very fast now.
Upstream bug ( https://issues.jenkins-ci.org/browse/JENKINS-17837 ) received some attention today. The issue was in the downstream-buildview plugin that would update the whole history of jobs apparently for no worthwhile reason. Upstream fixed the issue by removing the faulty class with https://github.com/jenkinsci/downstream-buildview-plugin/commit/47801c278f000b34eae5bd9d674029cf470cd8b2