Definitions

How computers for agents work, from the hardware to the sandbox.

Definitionsc

CPU cache

A CPU cache is a small, fast memory on the processor that keeps recently used data close to the cores.

L1, per coreL2, per coreL3, shared by all cores

A CPU cache is memory built into the processor, much smaller than main memory and many times faster. It holds copies of data and instructions that the cores used recently or will likely use next. Caches come in levels, from a tiny one per core to a larger one shared by all the cores on a chip. When the data a core needs is in the cache, it is a hit, and when it is not, it is a miss.

Main memory is slow compared with a core, so a miss can stall the core for hundreds of cycles. Caches hide most of that delay, because programs tend to reuse the same data and read data that lies close together. A program that fits in the cache can run several times faster than one that does not. Much of the tuning of fast code is about using the cache well.

Workloads on the same host share the larger caches, so one workload can slow another by filling the cache with its own data. This is one cause of noisy neighbors. The shared cache can also leak information between workloads through timing, which is the basis of some side-channel attacks. Platforms that run many sandboxes on one host limit these effects by spreading workloads and by patching processors and kernels.