Skip to content

Avoid starving system task workers#1204

Draft
v1r3n wants to merge 3 commits into
mainfrom
system_task_worker_perf
Draft

Avoid starving system task workers#1204
v1r3n wants to merge 3 commits into
mainfrom
system_task_worker_perf

Conversation

@v1r3n

@v1r3n v1r3n commented Jun 24, 2026

Copy link
Copy Markdown
Collaborator

…-queue semaphores

Replace scheduled-executor polling with a tight loop per queue: poll immediately when tasks are available, sleep only on empty poll. All non-isolated queues share one thread pool so threads aren't wasted on idle task types, while each queue gets its own semaphore so one busy type cannot starve others.

Adds conductor.app.taskWorkerConfigs.<TaskType>.{threadCount,permitCount} for per-type overrides: a non-zero threadCount gives the type a dedicated pool; permitCount caps in-flight concurrency independently of thread count.

Pull Request type

  • Bugfix
  • Feature
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • WHOSUSING.md
  • Other (please describe):

NOTE: Please remember to run ./gradlew spotlessApply to fix any format violations.

Changes in this PR

Describe the new behavior from this PR, and why it's needed
Issue #

Alternatives considered

Describe alternative implementation you have considered

…-queue semaphores

Replace scheduled-executor polling with a tight loop per queue: poll immediately when
tasks are available, sleep only on empty poll. All non-isolated queues share one thread
pool so threads aren't wasted on idle task types, while each queue gets its own semaphore
so one busy type cannot starve others.

Adds `conductor.app.taskWorkerConfigs.<TaskType>.{threadCount,permitCount}` for per-type
overrides: a non-zero threadCount gives the type a dedicated pool; permitCount caps
in-flight concurrency independently of thread count.
@v1r3n v1r3n marked this pull request as draft June 24, 2026 06:01
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

Successfully merging this pull request may close these issues.

1 participant