Semaphore system for matrix jobs

32 views
Skip to first unread message

thorste...@knime.com

unread,
Jan 20, 2014, 3:31:46 PM1/20/14
to jenkins...@googlegroups.com
Hi all,

We have a product that we are currently testing on six different operating systems. Our test jobs is a matrix job that runs on six different slaves (one for each OS). However, the slaves are virtual machines on a single host computer. It has enough RAM and disk space for even more VMs, but "only" six cores. I.e. if all matrix subjobs run at the same time, the system will be overloaded. On the other hand, sequential execution just takes too long. We need a mechanism to control the maximum number of concurrent matrix subjobs that are allowed to run at the same time. I haven't found any plug-in that can achieve this. Ideally each slave can be assigned a semaphore (the physical host for the VM) that has a maximum value (the number of jobs that can run at the same time). Does anybody know a way to achieve this with available plug-ins? How difficult would it be to create such an extension?

Cheers,

Thorsten

Benjamin Lau

unread,
Jan 20, 2014, 3:38:59 PM1/20/14
to Jenkins Users
I've always managed this by limiting the executors on the host where I
run the tests... but I'm suspecting you have a set up where each of
the VMs has its own computer/node entry in Jenkins so you have one
executor for each.

You might be able to work around this by setting up one of your
systems as the access point for the VMs and manage all the testing
from there. That way you can still host all the tests on your single
physical machine, but you can limit the number of concurrent jobs
using the existing executor feature.

Good luck,

Ben
> --
> 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.
> For more options, visit https://groups.google.com/groups/opt_out.

Magnus Sandberg

unread,
Jan 21, 2014, 8:34:01 AM1/21/14
to jenkins...@googlegroups.com
Hi,

I'm thinking about adding something like this to the Priority Sorter (JENKINS-21214) do you think that would be something for you?

/Magnus


2014/1/20 Benjamin Lau <benjami...@gmail.com>

teilo

unread,
Jan 21, 2014, 8:42:26 AM1/21/14
to jenkins...@googlegroups.com
I know of a comercial (not free) plugin that does this - http://www.cloudbees.com/jenkins-enterprise-by-cloudbees-features-label-throttled-build-execution-plugin.cb

As a plugin exists, the answer to your second question about extension points is answered with a yes - but I'm not sure what they are.

As always there are possibly other solutions to the same issue.

/James

Thorsten Meinl

unread,
Jan 21, 2014, 9:58:49 AM1/21/14
to jenkins...@googlegroups.com
Hi Magnus,

The description is a bit "high-level" but it looks like this could be a
fit to our problem. I'm happy to give it a try!

Thorsten

Am 21.01.2014 14:34, schrieb Magnus Sandberg:
> Hi,
>
> I'm thinking about adding something like this to the Priority Sorter
> (JENKINS-21214 <https://issues.jenkins-ci.org/browse/JENKINS-21214>) do
> you think that would be something for you?
>
> /Magnus
>
>
> 2014/1/20 Benjamin Lau <benjami...@gmail.com
> <mailto:benjami...@gmail.com>>
> <mailto:jenkinsci-users%2Bunsu...@googlegroups.com>.
> > For more options, visit https://groups.google.com/groups/opt_out.
>
> --
> 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
> <mailto:jenkinsci-users%2Bunsu...@googlegroups.com>.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Jenkins Users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/jenkinsci-users/nnZXDun4ZFE/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
Dr.-Ing. Thorsten Meinl
KNIME.com AG
Technoparkstr. 1
8005 Zurich, Switzerland

signature.asc

Magnus Sandberg

unread,
Jan 21, 2014, 11:20:13 AM1/21/14
to jenkins...@googlegroups.com
Hi,

I know ;-) feel free to add any requirement or suggestions you might have.

I was just trying to see if there's a true use case for this or not, I have thought about this along the same lines as in "Throttle Concurrent Builds Plugin" but for Job Groups as defined in Priority Sorter.

/Magnus



2014/1/21 Thorsten Meinl <thorste...@knime.com>

Thorsten Meinl

unread,
Jan 21, 2014, 3:19:13 PM1/21/14
to jenkins...@googlegroups.com
Am 21.01.2014 17:20, schrieb Magnus Sandberg:
> I was just trying to see if there's a true use case for this or not, I
> have thought about this along the same lines as in "Throttle Concurrent
> Builds Plugin" but for Job Groups as defined in Priority Sorter.
Definitely there is a use case. The link to the commercial extensions in
one of the other replies states exactly our problem. I just didn't find
where to get this extension independently of the whole "Enterprise
Jenkins" they want to sell.

Thanks for looking into this!

Thorsten
signature.asc
Reply all
Reply to author
Forward
0 new messages