Is there a plugin to limit the number of Jenkins jobs running?

46 views
Skip to first unread message

Tim Baron

unread,
Mar 30, 2018, 9:57:37 AM3/30/18
to Jenkins Users
Hello,

is there a plugin to limit the number of Jenkins jobs (more precisely pipeline jobs) currently running on Jenkins in total (master+slaves)?

Thanks

Tim

Matthew...@diamond.ac.uk

unread,
Mar 31, 2018, 4:46:32 AM3/31/18
to jenkins...@googlegroups.com
>> is there a plugin to limit the number of Jenkins jobs (more precisely pipeline jobs) currently running on Jenkins in total (master+slaves)?
I don't think it quite does what you want, but you might want to take a look at https://github.com/jenkinsci/throttle-concurrent-builds-plugin/blob/master/README.md
Matthew

--
This e-mail and any attachments may contain confidential, copyright and or privileged material, and are for the use of the intended addressee only. If you are not the intended addressee or an authorised recipient of the addressee please notify us of receipt by returning the e-mail and do not use, copy, retain, distribute or disclose the information in or attached to the e-mail.
Any opinions expressed within this e-mail are those of the individual and not necessarily of Diamond Light Source Ltd.
Diamond Light Source Ltd. cannot guarantee that this e-mail or any attachments are free from viruses and we cannot accept liability for any damage which you may sustain as a result of software viruses which may be transmitted in or with the message.
Diamond Light Source Limited (company no. 4375679). Registered in England and Wales with its registered office at Diamond House, Harwell Science and Innovation Campus, Didcot, Oxfordshire, OX11 0DE, United Kingdom

Tim Baron

unread,
Mar 31, 2018, 10:37:01 AM3/31/18
to Jenkins Users
Thanks for the suggestion.

I am aware of this plugin, but as you said it is not exactly what I want:

Each job needs to participate in the throttling voluntarily in that plugin. What I want is a global config that limits the number of jobs running absolutely. So no job can escape even if he likes to.

Does somebody have a different suggestion? Or perhaps I need to discuss the idea with the author of the throttling builds plugin.

Tim

Slide

unread,
Mar 31, 2018, 10:52:47 AM3/31/18
to jenkins...@googlegroups.com
Maybe you can describe more of what the end goal is, there may be another option available that people aren't thinking of because your use case isn't clear.

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/f4f118d9-2522-4206-8208-aab12c8b1517%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Tim Baron

unread,
Mar 31, 2018, 2:04:26 PM3/31/18
to Jenkins Users
In my setup each pipeline job running stashes lots of data. So if there are too many jobs running, the system will run out of disk space on some nodes or even the master.

Other motivation: in my pipelines some stages can only be run on a certain node. If the node becomes offline, jobs will all wait for the node to come online again. The jobs queue up in the build queue. As this might not be detected for a while, more and more jobs will queue up. It is likely that the master keeping the current stashes of all jobs running will run out of disk space eventually.

So i would like to limit the number of jobs running to say 20. More precisely if 20 pipeline builds are running (not finished) currently, a new pipeline build A would not get executed but would stay in the build queue. If a pipeline build finishes, build A would be permitted to leave the build queue to be executed on a node.

Tim
Reply all
Reply to author
Forward
0 new messages