Home / Software y Cloud / The server that runs out of memory no longer buys it: it borrows from the one next door

The server that runs out of memory no longer buys it: it borrows from the one next door

A modern data centre does not run out of CPU or disk: it runs out of memory. In the servers that feed language models and in-memory databases, RAM is the resource that sets the price and the one that is worst used. Half of the modules installed in a rack are typically sitting at 30 % occupancy while the server next door is short and cannot expand because it has no free slots. For four years the industry has been trying to fix that imbalance with a single idea: stop treating memory as something that belongs to a board and turn it into something requested over a fabric, the way a disk is requested from a SAN.

The standard that makes it possible is called CXL, Compute Express Link. It is not a network protocol and not a new bus: it is a protocol layer built on the physical layer of PCI Express, the same one graphics cards use. That means it reuses the connectors, the cabling and much of the electrical ecosystem that already exists, and that its first version ran on PCIe 5.0 with its 32 gigabits per lane and its 128b/130b encoding.

Three protocols on the same wire

CXL is not a single conversation but three that travel together on the same lanes and are told apart by packet type:

  • CXL.io: practically PCIe as it is. It enumerates the device, configures registers, assigns addresses and does DMA. Without it, the operating system would not know the device exists.
  • CXL.cache: lets an accelerator keep its own cache coherent with the processor’s memory. When the device wants data the processor has modified, it does not copy blindly: it asks permission and the processor invalidates its line before handing it over.
  • CXL.mem: the reverse path and the most used one. The processor reads and writes the device’s memory as if it were its own, cache coherency included and with atomic operations.

Coherency is not improvised. Each host keeps a home agent, a controller holding a filter of which cache lines every attached agent owns. When a device is about to write an address someone else has cached, the home agent sends a back-invalidation and waits for the acknowledgement before letting the write through. It is the same problem multiprocessors solved with MOESI-style protocols, except the agents are now half a metre of cable away instead of inside the same package.

What the trip costs

Here is the fine print that decides whether the idea works. Local memory, soldered next to the processor, answers in about 80 to 100 nanoseconds. CXL memory attached over PCIe 5.0 answers in roughly 170-250 nanoseconds: every transaction crosses a transmitter, a receiver, sometimes a signal retimer, and the module controller has to decode the address and look it up in its own silicon. That is two to three times slower, and in latency-sensitive workloads — a database index with random access, a pointer chase — it shows.

Bandwidth is also shared with whatever already travels on the bus. An x16 PCIe 5.0 link offers about 64 GB/s theoretical; PCIe 6.0, with PAM4 encoding and forward error correction, goes to 128 GB/s and is the base CXL 3.x sits on. Against the 400-800 GB/s of a local DDR5 channel, the gap is an order of magnitude. The practical conclusion is that CXL does not replace the processor’s DRAM: it adds a second tier.

Expand, pool or share

CXL devices are classified by what they contribute. Type 1 are accelerators with cache but no memory of their own. Type 2 add memory and are the case of GPUs and FPGAs: the host can reach the accelerator’s memory coherently, with no explicit copies. Type 3 are pure memory expanders, with no compute logic, and they are what made the market take off.

With a Type 3 expander you can do three different things, and they should not be confused:

  • Expansion: a single server sees more memory than would fit on its board. Simple, nothing shared.
  • Pooling: there is a common bag of memory and each server takes a slice. Slices do not overlap, so there is no coherency between hosts, but capacity can be reassigned from one server to another without powering anything down or moving modules.
  • Sharing: two or more hosts see the same physical address at the same time. It requires cross-host coherency and is the trickiest part: if one host dies, someone has to decide what happens to the shared data.

CXL 3.0 made the jump that was missing for this to scale: port-based routing, with CXL switches that allow building a memory fabric of up to 4,096 nodes, and multi-headed devices that present themselves as several independent logical partitions, up to sixteen, each assigned to a different host. Version 3.1 added reliability and fabric-management improvements, and it is the one hyperscalers are deploying.

What the operating system sees

None of this works if the software does not know. At boot, firmware describes the topology through ACPI tables: the CEDT (CXL Early Discovery Table) lists devices and capabilities, and the CFMWS (CXL Fixed Memory Window Structure) defines which physical address ranges map to CXL memory and with what interleaving. Linux, since 5.12, exposes that memory as an additional NUMA node.

From there on the trick is policy, not hardware. The HMAT table declares latency and bandwidth per node, and the kernel’s page scheduler can move hot pages to the fast node and leave cold ones on the slow one, a mechanism called tiering or memory demotion. With numactl --membind a process can be pinned to the local node; with automatic promotion and demotion policies, the system moves pages depending on how they are read. The result: a database with a 3 TB data set can run on a server with 1 TB of DRAM and 4 TB of CXL, accepting a 20-30 % penalty on queries that touch cold data.

The problem nobody wants to talk about

Shared memory fails differently from local memory. If the expander reboots, the host does not see a disk error: it sees addresses the kernel believed valid disappear, and that, at best, kills the process; at worst, corrupts system structures. That is why CXL forces full RAS — ECC, poisoned-error containment and event-based failure notification — and why serious deployments use fabric-level redundancy, not a single module hanging off a cable.

There is also a firmware and validation cost that explains why adoption is slower than the announcements suggest: every combination of CPU, CXL controller, module and BIOS is a new compatibility matrix. Dedicated controllers — Astera Labs’ Leo, Montage’s and Marvell’s — exist precisely to absorb that complexity with a chip that translates and retries.

Even so, the direction is clear. For twenty years memory was a local, rigid resource; storage stopped being one when storage-area networks appeared. If CXL delivers what it promises, RAM will follow the same path: it will stop being bought per server and start being allocated per rack, with the processor asking for memory the way it asks for a block of disk today.