We have been using the heavy job plugin and configured the nodes so that
they have as many executors as cpus.
There we could set in the job the job weight to as many cpus the job
really used.
But we shifted over to using pipeline and groovy script and now that
parameter is not possible to set in the job config.
Is there some way I can make this work from the groovy script ?
Right now I have this code in the node() part that reads out how many
cpus there is on the node that was assigned.
node_cpus = sh(script: "nproc", returnStdout : true).trim() as Integer
but that is already after jenkins has assigned a node so that is
probably to late to be useful.
Basically the build is going to use all cpus that exist on the build
machine. But in reality only 20% of the time is it actually parallel
enough to use more than 2-3 cpus at the same time so we want to have the
job weight be about 25% of the real value.
So as long as this is the only type we have we could just assign 4
execution units on the node but that fails if we add a job that really
can use all the cpus all the time then that job really need to take the
full number of execution units.
suggestions?
--
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-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/jenkinsci-users/8ead9628-a4d0-23fe-f978-e4c952f64ce5%40inteno.se.
For more options, visit https://groups.google.com/d/optout.