Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lockable resources slowness in scheduling #717

Open
e-hanna opened this issue Oct 16, 2024 · 0 comments
Open

Lockable resources slowness in scheduling #717

e-hanna opened this issue Oct 16, 2024 · 0 comments

Comments

@e-hanna
Copy link

e-hanna commented Oct 16, 2024

Jenkins and plugins versions report

Jenkins: Jenkins 2.462.2
Lockable resources: issue started as of version 1246.v28b_e4cc6fa_16 (new priority strategy), no issues in prior versions.

What Operating System are you using (both controller, and any agents involved in the problem)?

Controller: jenkins:2.462.2-lts-alpine
Agent: Linux 5.15.0-69-generic #76-Ubuntu SMP using a jenkins pipeline script

Reproduction steps

In the jenkins groovy code, I am using the lockable resources as such:
def runWrapper = lock(label: "${lock_label}", quantity: 1, variable: "LOCKED")
I am using the lockable resources with the build step plugin (to build other jobs) and without using the priority option as shown above.
The issue can be reproduced when the job is ran in a big number (number of lockable resources x 20) in parallel. The issue wasn't reporduced at 100 parallel jobs, but was shown when 1000 jobs were ran.

Expected Results

What is expected and what has been occuring in the versions prior to 1246.v28b_e4cc6fa_16, is that the lockable resources are assigned each to a job, and whenever a job ends, the resource is released and assigned to the second job, so at all times, we have (number of lockable resources) jobs running at the same time. The lock should be released as soon as the jobs ends. Opening the Lockable resources tab in the dashboard is also expected and was happening before this version.

Actual Results

Instead of assigning the resource to another build whenever one is completed, it takes a long time to assign another job, sometimes the whole batch ends (all the inital jobs) and still no scheduling has occured. The releasing of the lock doesn't occur as soon as the job ends, many jobs end before releasing the lock of the first one. Additionally, I cannot open the Lockable Resources tab in the jenkins dashboard, it keeps loading and takes several minutes to open.

Anything else?

This issue is very important since many of our pipeliens are using the parallelism combined with the lockable resources.

Are you interested in contributing a fix?

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant