The Memory Race
Every fact your computer uses lives somewhere, and every somewhere has a price in time. This race sends one fetch to each store at the same instant and times the full trip: the ask goes out, the data comes back. The measure of the race is the CPU clock itself. The clock built here runs at 3.0 GHz: three billion cycles a second, one cycle every third of a nanosecond. Each lane states its time in seconds and in clock cycles, because cycles are what the CPU actually spends waiting.
How a fetch walks. The CPU sends its ask down the levels, nearest first. It asks L1. On a hit, L1 answers at once. On a miss, the ask passes down to L2, then to L3, then out to main memory, and at the far end to storage or to another machine. The data then walks back up the same road. One lane of this race is one full trip, down and back, timed whole. The dots run on the road at the left: gold going down with the ask, blue coming back up with the data. The fast lanes move so fast against the slow ones that their dots smear toward a solid line. That smear is not a shortcut in the drawing. It is the true shape of the gap.
The prefetch road. The CPU rarely waits idle for the far stores, because the memory system guesses. While the CPU works, its prefetchers pull the data it is likely to ask for next up the levels ahead of the ask, from main memory into L3, L2, and L1, so the answer is already close when the ask comes. A good guess turns a hundred-nanosecond trip into a one-nanosecond one. A bad guess wastes the road. Much of processor design is this guessing game, played at clock speed.
Heat. The color of a lane carries its speed. The slowest lanes run dark and cool. The faster a lane runs, the brighter and hotter its color climbs, until the fastest lanes burn near white. The scale under the game states the mapping in plain words: slow and dark at one end, fast and bright at the other, on fire at the top.
The controls. Time has a slider at the top of the page: drag it left to slow time down, right to speed time up, across a wide range, and the race answers the slider as it moves, in mid-run, with no restart. The zoom stretches one slice of each trip across the whole track, so the fast end can be watched apart from the slow end: the first tenth, the first hundredth, the first thousandth, or the finish. The loop switch runs the whole race again when the last lane lands, so the trips can be followed down and back, again and again.
The figures. Latencies are typical teaching values, in the line of the classic latency table kept by Jeff Dean and the humanized scale drawn by Colin Scott. They are stated as typical, not as the spec of any one part: a given chip, drive, or network will differ, and the remote server is the variable one by its nature. The ratios between the lanes are true to the figures shown.
Sound. Each kind of store can carry its own sound, a short tone at its own pitch when its fetch lands. Sound starts off. Tick a lane's sound box to arm that lane alone; mute one kind and keep the rest.
The Transfer Race
The memory lanes above time a fetch: a trip out and back. These lanes time a move: one kilobyte of data, 1,024 bytes, pushed down a road at the road's line rate, counting eight data bits to the byte. Dial-up framing added roughly a quarter more time on top of these figures in its day. Same kilobyte on every lane. The only difference is the road.
The modem lanes carry a sound of their own kind: a short nod to the dial-up handshake, the screech every house once knew by heart. Arm it with the lane's sound box, like the rest.