Skip to content

Allow external adjustment of parallel search workers - #233

Open
zayenz wants to merge 11 commits into
mainfrom
feature/par-search-worker-adjustments
Open

Allow external adjustment of parallel search workers#233
zayenz wants to merge 11 commits into
mainfrom
feature/par-search-worker-adjustments

Conversation

@zayenz

@zayenz zayenz commented Jul 24, 2026

Copy link
Copy Markdown
Member

Parallel portfolios sometimes need to move a fixed CPU budget between search
engines while those engines keep running. This adds Search::WorkerControl, a
copyable external handle for changing how many of a parallel engine's
pre-created workers may execute.

The initial threads value remains the fixed resident capacity. A control
starts with a request between one and that capacity; later request() calls
are thread-safe and non-blocking. Growing wakes parked workers. Shrinking is
cooperative: excess workers finish their current search action before parking.

The control applies to parallel DFS and BAB, including leaf engines owned by
RBS and PBS. PBS deliberately keeps one control per asset; allocation policy
and any portfolio-wide budget invariant remain with the caller.

The handle binds to one logical leaf-engine lifetime. Copies share the same
request state, and an empty handle preserves existing fixed-worker behavior.

Validation includes:

  • a release build of the complete gecode-test binary;
  • the existing randomized DFS and BAB matrix, with mixed fixed and adjustable
    engines plus sampled asynchronous resizing;
  • the existing RBS and PBS matrices, including independently adjusted explicit
    portfolio assets; and
  • a no-thread build plus focused worker-control API and lifecycle checks.

@zayenz
zayenz force-pushed the feature/par-search-worker-adjustments branch from 5db14f4 to 5f9d5e0 Compare July 28, 2026 08:23
@zayenz zayenz changed the title Feature/par search worker adjustments Allow external adjustment of parallel search workers Jul 28, 2026
@zayenz
zayenz marked this pull request as ready for review July 28, 2026 13:57
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