Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jenkins server is running slow

Tags:

jenkins

My Jenkins server is so slow. Java takes 120% or CPU. How can I give Jenkins more memory access.

Of what steps can I take to improve the load time for Jenkins

like image 402
Chris Hansen Avatar asked Aug 20 '16 18:08

Chris Hansen


People also ask

How reduce Jenkins memory usage?

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.

How do I fix Jenkins build failure?

In Jenkins, in the pipeline where the failure occurred, in the navigation pane, click Rebuild. In the Rebuild page, select the ReRun check box , and click Rebuild.

What happens if Jenkins master goes down?

Whenever there is a problem with the active master and it goes down, the other master will become active and requests will resume. These requests will then be served by the master that has become active.


1 Answers

If Java memory is causing the problem, then you can add more heap via the -Xmx option, as suggested in Priyam's answer. By default, JVM limits heap to 25% of your available RAM.

More heap has a caveat, though: if you add heap in the range of several GB, then the default JVM garbage collection algorithm will periodically impose stop-the-world breaks in the range of several seconds. You then need to switch to a custom garbage collection algorithm (like, CMS) and then carefully tune its parameters.

If adding more heap does not fix your problem, then you need to dig deeper. There's a plethora of possible root causes for a slow master -- from JVM memory and garbage collection settings to plugin issues, on top of the usual CPU/disk/IO-dimensioning issues.

like image 155
Alex O Avatar answered Oct 10 '22 15:10

Alex O