OCS — Light Is the Network
A TPU pod doesn't rewire itself with cables or packet switches — it tilts microscopic mirrors and steers laser beams. How the Optical Circuit Switch turns mirror angles into topology, slices pods, heals around dead cubes, and reshapes the network per job.
100Foundational TPU architecture & provisioningLesson 5 of 8ShowHide
Chapter 1 of 2 in TPU Training Infrastructure
- OCS — Light Is the NetworkYou're here
Prerequisites: TPU Evolution — Chasing the Bottleneck, TPU Topologies — the two networks & the shapes
The one-line summary
You met the in the evolution story — V4's answer to pods too big for static copper. Here's the part that sounds like science fiction: a TPU pod rewires itself by tilting microscopic mirrors. The network is light, and topology is just the current mirror configuration.
Two views of the same photons
The explorer below shows both panes at once: on the left, the logical topology software sees; on the right, the Palomar OCS — a matrix of MEMS mirrors — that photons see. The same pulse is drawn in both. Walk the five operations:
- Global ring — a photon leaves a cube face, bounces off one mirror, lands at the next cube. The switch never reads the data.
- Pod slicing — re-tilt the mirrors and one supercomputer becomes two. The slices share zero optical links: isolation enforced by physics, not QoS.
- Cross-rack jobs — logical neighbors ≠ physical neighbors. Any healthy cubes, anywhere on the floor, can be warped into a contiguous slice.
- Spare-cube repair — when a cube dies, drop 2 circuits, raise 2 to the hot spare: 4 mirror moves and the job keeps its torus shape.
- Topology shuffle — every press is a new network, born purely from mirror angles. Circuits are set per job, never per packet.
Keeping the beam locked: the two-color trick
A fair question: how does a tilted mirror reliably hit a fiber thousands of mirror-widths away — and hold it for a week-long job, through vibration and thermal drift? Apollo's answer is a second color. The data rides O-band signal light; alongside it, an 850 nm monitor beam is injected and read by a camera, merged and split by a dichroic mirror (one that reflects one wavelength and passes the other). The camera sees exactly where each beam lands, and a control loop nudges the MEMS mirrors back on target — closed-loop alignment. That servo is what makes an all-optical switch reliable enough to anchor a 4,096-chip pod with no packets to retransmit.
Why the cube is the unit
Inside a 4×4×4 cube, all 64 chips are hard-wired electrically — that never changes. Only the cube's 48 optical in/out pairs rise to the OCS layer. So everything the OCS does — slicing, healing, reshaping — happens at cube granularity. (The explorer shows 8 of 64 cubes and 1 of 6 link dimensions; the real pod runs that picture six times in parallel, which is how it builds full — even twisted — 3D toruses.)
What it costs, what it buys
The entire OCS layer is under 5% of system cost and ~3% of power (per the TPU v4 paper) — and in exchange the pod gains slicing, fault-healing, and per-job topology. That's why the evolution lesson called OCS the only way to physically wire a 100×-pod: a static harness of this size would fail constantly; mirrors route around death in milliseconds.
Why this matters
Every idea later in the path leans on this: slices of arbitrary shape (topologies), schedulers that build them from whatever's healthy (provisioning), and Multislice jobs that treat pods as LEGO. Once you've seen that topology is software, none of those feel arbitrary.
Put it together
Slice the pod
Switch to pod slicing and explain in one sentence why Job A physically cannot slow down Job B — without mentioning QoS.
Predict the repair
Before pressing run the failure: how many mirrors must move to splice the spare in? Run it and check your prediction against the mirrors moved telemetry.
Shuffle and reflect
Press topology shuffle a few times. Why is "the network reconfigures in milliseconds" fast enough for training jobs but useless for packet switching?
Review
What does an OCS actually switch?
Check yourself
To change which cube talks to which, what physically changes?
Go deeper
Jupiter Rising: Clos topologies & centralized control (SIGCOMM 2015) →
Google's datacenter-network paper — the centralized, software-defined control plane that later reconfigures the OCS. Background on the SDN/Clos foundation, not the OCS itself; for OCS specifics see the Mission Apollo (2022) and TPU v4 ISCA (2023) papers.
LinkMission Apollo: Optical Circuit Switching at datacenter scale (2022) →
The OCS primary source. The Palomar 136×136-port MEMS switch, the dual-wavelength design (O-band signal + an 850 nm monitor beam with a camera and dichroic splitter for closed-loop mirror alignment), and how Google landed all-optical switching in production.
LinkTPU v4: An Optically Reconfigurable Supercomputer (ISCA 2023) →
How the OCS is used inside the TPU v4 supercomputer: 64-chip cubes wired by 128-port OCSes into a reconfigurable 3D torus, per-job topology, and the <5%-cost / ~3%-power figures this topic cites.