Upload: "Limited by: console memory" when the console was idle was really the network (#437)

The sender called any wait for the console's credit "console memory"
unless the console reported its disk or workers as the limit. When the
console reports its queue ran dry, it is idle, waiting for data: the
credit is slow in transit (here a Windows Internet Connection Sharing
bridge on a CPU busy converting), so the cause is the network.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ub1mez9eaVtTF8pMEFXvA9
This commit is contained in:
phantomptrandClaude Opus 5.5 committed 2026-10-11 00:18:56 -07:00
1 parent 35fece053b
commit cea5c5c264
2 files changed
+28 -1

No files matched your search

+26
View File
@@ -251,8 +251,11 @@ impl Governor {
let bottleneck = if s.source_starved {
BN_SOURCE
} else if s.credit_starved {
// The console's own word decides: its disk or workers hold the credit back;
// an idle console (its queue ran dry) means the credit is slow in transit.
match s.receiver_bottleneck {
BN_DISK | BN_WORKERS => s.receiver_bottleneck,
BN_NETWORK => BN_NETWORK,
_ => BN_CREDIT,
}
} else {
@@ -630,6 +633,29 @@ mod tests {
);
}
#[test]
fn waiting_on_credit_while_the_console_idles_is_the_network_not_its_memory() {
// #437: the console's queue ran dry (it says BN_NETWORK), so the credit we wait for
// is slow in transit (a congested or CPU-starved software bridge), not held back by
// a full console. "console memory" sent people looking at the wrong thing.
let mut g = Governor::new();
let s = Sample {
secs: 1.0,
bytes_acked: 10,
lanes: 2,
credit_starved: true,
receiver_bottleneck: crate::gen::BN_NETWORK,
..Default::default()
};
assert_eq!(g.tick(&s).bottleneck, crate::gen::BN_NETWORK);
// No word from the console yet: credit is all we know.
let s = Sample {
receiver_bottleneck: crate::gen::BN_NONE,
..s
};
assert_eq!(g.tick(&s).bottleneck, crate::gen::BN_CREDIT);
}
#[test]
fn bundles_scale_with_the_link() {
let mut g = Governor::new();
+2 -1
View File
@@ -1122,7 +1122,8 @@ numbers they are fed, so both are tested against models rather than sockets.
files/s by ≥ 10 %; revert and hold 30 s otherwise; release one after 3 idle steps; range
2–16, start 4.
- Bottleneck: source starved → `BN_SOURCE`; credit starved → the receiver's reported bottleneck
(`BN_DISK`/`BN_WORKERS`), else `BN_CREDIT`; otherwise `BN_NETWORK`.
(`BN_DISK`/`BN_WORKERS`; `BN_NETWORK` when its queue ran dry, the credit being slow in transit),
else `BN_CREDIT`; otherwise `BN_NETWORK`.
16.9 Status: the receiver sends `Status` (IGNORABLE) every 250 ms while a job is open: files
and bytes done, durable bytes, its own bottleneck (`BN_DISK` when workers are at their maximum