Skip to main content

UPLOAD_MEMORY_BUDGET

Constant UPLOAD_MEMORY_BUDGET 

Source
pub const UPLOAD_MEMORY_BUDGET: u64 = _; // 268_435_456u64
Expand description

Target peak-memory budget for in-flight part buffers (256 MiB). Each in-flight part buffers up to part_size bytes, so effective_in_flight derives the in-flight count as budget / part_size.

This is a TARGET, not a hard ceiling: it holds while part_size is small relative to the budget (the normal case — 8 MiB parts stay well under it). It cannot bound memory below one in-flight part, so when the server returns a very large part_size (e.g. a 5 GiB part on a huge file), a single in-flight part already exceeds this budget and peak memory is 1 * part_size. In other words the budget caps concurrency, not the size of one part.