feat(pool): no machine-wide width - 128 passes per available account
Jorijn: "there is no need to do a global cap anymore, the cap should be 128 per available account". `--concurrency` no longer defaults to 128: the limits are each OAuth account's 128 (and the local login's), every driver's counted, an API seat's own REVIEW_GATES_API_CONCURRENCY, and free memory. `--concurrency N` still caps the machine when given; a value below 1 is a usage error. The dump's args.concurrency is null then. The board's driver settings read `128 per account`, which every driver's `seats` shows as that driver's width, and the `seats` header says a width is that driver's cap. The Scheduler test runs 300 passes on two accounts: 256 at once, 128 each. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
c28307601b
commit
61ee4602f4
12 changed files with 98 additions and 19 deletions
|
|
@ -784,7 +784,7 @@ namespace Crafter::Review::Pool {
|
|||
Sleep(std::min(60.0, Number(pauseUntil) - now));
|
||||
continue;
|
||||
}
|
||||
while (!queue.empty() && static_cast<std::int64_t>(running.size()) < o.concurrency && !paused) {
|
||||
while (!queue.empty() && (!o.concurrency || static_cast<std::int64_t>(running.size()) < *o.concurrency) && !paused) {
|
||||
std::vector<Json*> live;
|
||||
for (Slot& slot : running) live.push_back(&slot.job);
|
||||
// Without a board every queued pass waiting for a stack or
|
||||
|
|
@ -820,8 +820,8 @@ namespace Crafter::Review::Pool {
|
|||
if (o.board) {
|
||||
// The board folded, the seats ranked, the admission
|
||||
// checked against every driver's passes and the pick
|
||||
// registered in one locked section; the pool width is
|
||||
// the machine's cap.
|
||||
// registered in one locked section; a pool width, when
|
||||
// given, is the machine's cap.
|
||||
const SeatPool::Board::Placed placed = o.board->Place(*o.seats, o.now(), o.seatConfig, o.apiConfig,
|
||||
[&](const std::vector<Json*>& c, const SeatPool::Others& others) { return choose(c, &others); }, o.concurrency);
|
||||
cands = placed.ranked;
|
||||
|
|
@ -833,7 +833,7 @@ namespace Crafter::Review::Pool {
|
|||
if (full) {
|
||||
if (roomWait.is_null()) roomWait = pauseUntil;
|
||||
RaisePause(o.now() + o.noRoomWait);
|
||||
Log(std::format("pool: {} passes in flight on this machine, the cap is {} - re-checked in {:g} s, {} queued", full, o.concurrency, o.noRoomWait, queue.size()));
|
||||
Log(std::format("pool: {} passes in flight on this machine, the cap is {} - re-checked in {:g} s, {} queued", full, o.concurrency.value_or(0), o.noRoomWait, queue.size()));
|
||||
paused = true;
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue