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

Improve behaviour of background workers #2312

Merged
merged 7 commits into from
Jun 27, 2024
Merged

Improve behaviour of background workers #2312

merged 7 commits into from
Jun 27, 2024

Conversation

Floppy
Copy link
Collaborator

@Floppy Floppy commented Jun 27, 2024

This PR improves the behaviour of the job runners. It adds a separate "performance" runner which can be scaled independently, and which takes care of the CPU/MEM intensive jobs like GeometricAnalysis and FileConversion.

Default scaling is that there is only one performance runner - this avoids the entire server becoming CPU-saturated when those jobs are queued up.

Concurrency can be controlled with DEFAULT_WORKER_CONCURRENCY (default 4) and PERFORMANCE_WORKER_CONCURRENCY (default 1)

It also reinstates sidekiq's retry functionality to handle things like database pool exhaustion.

@Floppy Floppy added improvement Refactors and behind-the-scenes improvements performance Speedy go fast labels Jun 27, 2024
Copy link

codeclimate bot commented Jun 27, 2024

Code Climate has analyzed commit ced4cf3 and detected 0 issues on this pull request.

The test coverage on the diff in this pull request is 100.0% (50% is the threshold).

This pull request will bring the total coverage in the repository to 86.2% (0.0% change).

View more on Code Climate.

@Floppy Floppy merged commit afed90c into main Jun 27, 2024
10 checks passed
@Floppy Floppy deleted the rearrange-workers branch June 27, 2024 08:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement Refactors and behind-the-scenes improvements performance Speedy go fast
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant