Bits in memory do get corrupted: because of cosmic particles and chip ageing, a one is read back as a zero and vice versa. In ordinary memory the fault passes unnoticed, while in ECC memory the controller recalculates the check bits on every access, corrects single-bit errors and logs double-bit errors — the program gets its data undamaged and the system knows about every error.
How it works
Each memory word carries bits computed with a Hamming code (SECDED) — in the classic DDR4 scheme that is 8 check bits per 64 bits of data. DDR5 splits the bus into two 32-bit subchannels, each with its own 8 check bits. From the resulting code bits the controller tells whether there is an error and in which bit.
| Errors | What happens | Flag |
|---|---|---|
| 0 | the data is correct | CE counter does not grow |
| 1 | corrected on the fly, the counter grows | correctable error, CE |
| 2 | detected but not corrected | uncorrectable error, UCE |
Where it is used
ECC is used where a silent bit flip costs more than the extra bits on the bus: in servers, workstations and data-centre GPUs with HBM and GDDR. Ordinary desktop modules omit ECC to save cost.
- Server memory: DDR5 RDIMM and LRDIMM modules are built with ECC.
- GPUs: HBM on data-centre cards always comes with ECC; on GDDR cards ECC is enabled by a driver setting and requires a reboot.
How to calculate
The usable capacity of a module is smaller than its physical capacity: the check bits are stored in separate chips.
# ECC DDR4: 72 bits versus 64 — overhead = 8 / 64 = 12.5%# ECC DDR5: two 32+8 subchannels — now 16 check bits per 64 bits of dataA diagnostics example on a GPU
nvidia-smi -q -d ECCnvidia-smi -q -d ROW_REMAPPERThe counters are tracked on two timescales: volatile counts from the last driver load, aggregate counts over the whole life of the card. A rising UCE count is a reason to reboot the node (on a GPU this resets the card), and if the errors keep coming back, the module or the card should be replaced.
Sources
the term is written from these pages- NVIDIA CUDA — Xid Errors (Xid 48, Xid 63)docs.nvidia.com/deploy/xid-errors/index.html(opens in a new tab)
- NVIDIA — nvidia-smi Documentation (ECC Errors, ECC Mode, Row Remapper)docs.nvidia.com/deploy/nvidia-smi/index.html(opens in a new tab)
- JEDEC — анонс стандарта DDR5 (JESD79-5)jedec.org/news/pressreleases/jedec-publishes-new-ddr5-standard-advancing-next-generation-high-performance(opens in a new tab)
Verified 9 Nov