refactor(merge): extract adaptive worker spawn logic #28

Merged
coissac merged 1 commits from push-yzruqtyqvopm into main 2026-06-13 12:56:34 +00:00
Owner

Centralize inline spawn checks into a should_spawn_worker function with adaptive thresholds. The first worker spawns at <95% CPU efficiency, while subsequent workers only trigger if marginal efficiency gain exceeds 25% of the expected 1/n_workers (minimum 3%). Also increases the spawn poll interval from 10s to 20s.

Centralize inline spawn checks into a `should_spawn_worker` function with adaptive thresholds. The first worker spawns at <95% CPU efficiency, while subsequent workers only trigger if marginal efficiency gain exceeds 25% of the expected `1/n_workers` (minimum 3%). Also increases the spawn poll interval from 10s to 20s.
coissac added 1 commit 2026-06-13 12:56:31 +00:00
Centralize inline spawn checks into a `should_spawn_worker` function with adaptive thresholds. The first worker spawns at <95% CPU efficiency, while subsequent workers only trigger if marginal efficiency gain exceeds 25% of the expected `1/n_workers` (minimum 3%). Also increases the spawn poll interval from 10s to 20s.
coissac merged commit f1d76f3203 into main 2026-06-13 12:56:34 +00:00
coissac deleted branch push-yzruqtyqvopm 2026-06-13 12:56:48 +00:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: OBIKmers/obikmer#28