Chunked processing runs a computation over a dataset one slice at a time, carrying between slices only the state the computation needs to continue exactly (a filter’s last value, a window’s tail), so that the memory it uses is set by the chunk size and not by the size of the data. The peak resident memory of a process is the largest amount of physical memory it occupied at any moment; it, not the average, decides whether a job fits a machine.
bench_pyscale.py.