liveBook · Manning

Memory bound

As explained in Refactoring to Rust

A bottleneck is a component or operation that limits the throughput or execution speed of a larger system.

A bottleneck is the component or operation that limits a system’s throughput or execution speed. Memory is one resource that vertical scaling can add, but the bottleneck discussion does not identify memory as the limiting resource. section 8.2

When performance reaches a limit, the described options are rewriting code or scaling. Scaling can add service instances horizontally or resources such as memory to an existing machine vertically; horizontal scaling may require code changes to coordinate distributed instances. section 8.2

Python bottleneck and Rust

A Mandelbrot workload is refactored so Python can call Rust through PyO3. The Rust function releases the GIL, allowing other threads to run; this addresses a Python performance bottleneck, not a specifically identified memory limit. section 8.6

How Refactoring to Rust covers it

How deep it goes
Defines bottlenecks and contrasts scaling approaches, but does not explain how to diagnose memory as the limiting resource.
Examples
Uses a Mandelbrot workload to illustrate Python-to-Rust refactoring and shows multiple Python processes as a horizontal-scaling example.
What you can do after
Evaluate whether to rewrite code or scale horizontally or vertically after identifying a system performance limit.
How it connects
Connects bottlenecks with horizontal scaling, vertical scaling, code refactoring, and the Python GIL.

Also explained in

Compare how 11 books explain memory bound →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Refactoring to Rust. The section links point to the parts of the book it draws on.