Jenkins is very slow on the first visit in the early morning. This also happens if we restart the Jenkins server.
So the first developer accessing the jenkins has sometimes wait up to 3 minutes. We thought it was an issue with the build load. So we moved all build-jobs to a jenkins slave. But the issue has not been solved with it.
Since the performance seems to be always bad after restart. I assume jenkins reads a lot of stuff into memory. How can we enforce jenkins to precache stuff? We can give jenkins a hughe amount of RAM if needed. Hopefully the cache will solve the speed issues.
Fortunately, the most common reasons your Jenkins instance is slow are easy to diagnose and correct: Non-performant plugins. Poorly tuned JVM arguments. Non-optimal garbage collection.
One is to make sure you're rotating your build history or discarding your old builds. That helps reduce Jenkins' memory footprint, which improves performance. We recommend keeping 30 to 60 days of build history, but you should configure this on a per-job basis.
Whenever restart Jenkins it takes roughly half an hour to start up. Running strace on the process it is reading all the build histories.
It would be difficult to definitively say what is causing your Jenkins instance to take so long to startup, though it is highly likely that one of your installed plugins is the offender.
For example:
Surely there are other plugins besides these two which have bugs/issues resulting in slow startup times as well. Some may have had issues and subsequent versions have addressed the performance issues.
Therefore, performing the following steps should at least reveal the culprit if not entirely fix the issue:
If upgrading to the latest versions does not improve your startup time, step 4 should reveal the culprit.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With