wikipedia

Support Wikipedia

Thursday, September 13, 2012

Improving performance of Jenkins

Jenkins slows down over a period of time. Builds start taking more time than usual. The start up time increases to manifolds. You may wonder that throwing in more memory to the Jenkins process or making the JVM process do garbage collection frequently, etc might make it better. But if that doesn't do the trick, then read on.

One way to check if builds in Jenkins are taking a long time is by running them outside of Jenkins. if you see a considerable difference in the times then Jenkins may be slowing down.

Here is a white paper on optimizing Jenkins written by it's creator with some really nice tips.

But in our case the real reason for the slow performance turned out to be the temp files! Jenkins creates a boatload of them, around 100s  (this depends on how many active jobs you have) each hour and doesn't bother to clean them up at all.

On windows platform  Jenkins writes to C:\Temp and on Linux it is /var/tmp. Luckily there is a plugin which can be configured to clean out these directories. For example you could setup the plugin to keep files which are a day old and get rid of the rest.

Try it out and see if that makes Jenkins sprint.

No comments:

Post a Comment