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
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.
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.
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.
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.
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