RAM

On this page 7

RAM (random-access memory) is the computer’s fast, volatile working memory: it holds the program code and data that the processor is actively using, and it loses its contents when power is removed. In hardware, and specifically in memory, the term usually refers to the DRAM modules or chips that form main memory, as distinct from the SRAM caches inside the processor and from persistent storage such as SSDs.

“Random access” means that any address can be read or written in roughly the same time, unlike sequential media such as tape. RAM sits in the middle of the memory hierarchy: it is about a thousand times faster to access than an NVMe SSD but slower than on-chip cache, and its capacity, bandwidth and latency together shape how responsive a system feels.

How RAM stores and delivers data

Main memory is built from DRAM (dynamic RAM), in which each bit is stored as a charge in a tiny capacitor paired with one transistor. The charge leaks away, so every row must be refreshed periodically: within a 64 ms window in DDR4 and a 32 ms window in DDR5 under normal conditions. Refresh consumes time and power, which is one reason DRAM never reaches cache-like speed.

DRAM is organized hierarchically into channels, ranks, bank groups, banks, rows and columns. To read data, the memory controller activates a row, which copies it into a row buffer, and then reads columns from that buffer. Accesses that hit an already open row are fast; accesses to a different row in the same bank must wait for a precharge and a new activation.

SRAM (static RAM), by contrast, stores each bit in a circuit of about six transistors that needs no refresh. It is much faster but far less dense and more expensive per bit, so it is used for CPU caches rather than main memory.

Bandwidth, latency and capacity

Three parameters describe RAM performance, and they are often confused. Capacity determines how much fits before the system must swap to storage, bandwidth determines how many bytes per second can move, and latency determines how long a single random access takes.

Peak bandwidth equals transfer rate multiplied by bus width. A 64-bit channel of DDR5-6000 transfers 6,000 million times per second x 8 bytes = 48 GB/s, so a typical dual-channel desktop reaches about 96 GB/s. True latency in nanoseconds equals CAS latency x 2,000 / data rate: DDR4-3200 CL16 gives 16 x 2,000 / 3,200 = 10 ns, and DDR5-6000 CL30 gives 30 x 2,000 / 6,000 = also 10 ns. Higher CL numbers on newer memory therefore do not mean slower first-word access.

ParameterUnitTypical valuesWhat it affects
CapacityGB8 to 128 GB client, up to several TB per serverNumber and size of programs held in memory
Data rateMT/s3,200 (DDR4) to 8,000+ (DDR5)Peak bandwidth
CAS latencyClock cyclesCL16 to CL22 (DDR4), CL28 to CL46 (DDR5)Delay of the first data word
ChannelsCount2 client, 8 to 12 serverTotal bandwidth
Ranks per moduleCount1 or 2 (client), up to 4 or 8 (server)Capacity and parallelism
Operating voltageV1.2 V (DDR4), 1.1 V (DDR5)Power consumption and heat
Core RAM parameters

Types of RAM in modern systems

All mainstream main-memory types are DRAM, but they are tuned for different trade-offs between bandwidth, power, capacity and cost. Standards are defined by JEDEC, which allows modules from different manufacturers to work with any compliant platform.

TypeMain useForm factorKey characteristic
DDR4Older desktops, laptops, serversDIMM, SO-DIMMOne 64-bit channel per module
DDR5Current desktops, laptops, serversDIMM, SO-DIMM, CAMM2Two 32-bit subchannels, on-module power management
LPDDR5 and LPDDR5XPhones, thin laptops, Apple siliconSoldered or LPCAMM2Very low power, high data rates
GDDR6 and GDDR7Graphics cardsSoldered next to the GPUVery high bandwidth per pin
HBMAI accelerators, HPCStacked dies on the packageUltra-wide bus, several TB/s
Common DRAM families compared

Server memory adds features for reliability. Registered DIMMs (RDIMMs) buffer command signals so that more modules per channel are possible, and ECC adds extra bits that correct single-bit errors. The on-die ECC inside every DDR5 chip is not the same thing: it protects only the cells inside the chip, not the data traveling to the processor.

How RAM compares with cache and storage

RAM is one layer in a hierarchy where each step trades speed for capacity. The processor works best when the data it needs is already in the faster layers.

LayerTypical access timeTypical capacityVolatile
CPU registersUnder 1 nsHundreds of bytes per coreYes
SRAM cache (L1 to L3)About 1 to 15 nsKB to hundreds of MBYes
DRAM main memoryAbout 60 to 100 nsGB to TBYes
NVMe SSDAbout 50 to 100 microsecondsHundreds of GB to tens of TBNo
Hard disk driveAbout 5 to 10 msSeveral TB to over 20 TBNo
Position of RAM in the memory hierarchy

Choosing RAM and avoiding common mistakes

The first rule is to provide enough capacity for the working set, because running out of RAM forces the operating system to page memory to storage, which is orders of magnitude slower. Only after capacity is sufficient do speed and timings make a meaningful difference.

  • Using a single module: one stick runs the CPU in single-channel mode and roughly halves bandwidth compared with a matched pair.
  • Not enabling memory profiles: performance modules run at a conservative JEDEC speed until an XMP or EXPO profile is enabled in the firmware.
  • Mixing different kits: modules with different timings or ranks may force lower speeds or cause instability.
  • Filling all four slots on DDR5 desktops: two modules per channel often lower the maximum stable data rate.
  • Assuming more RAM always helps: memory that is never used brings no speed benefit.

Stripped to the essentials

RAM is the computer’s short-term memory. It holds whatever the computer is working on right now, such as open apps, browser tabs and the document being edited.

Think of it as the top of a desk. Storage is the filing cabinet where everything is kept long term. A bigger desk lets more work stay within reach at once. When the computer is switched off, the desk is cleared, which is why unsaved work disappears.

Where it is applied

A video editor works on 4K projects on a laptop with 16 GB of RAM. During editing, the system uses its whole memory, and the operating system starts swapping data to the SSD, which causes dropped frames during preview and slow timeline scrubbing.

The editor replaces the laptop with a model that has 64 GB of dual-channel DDR5-5600 memory. With the same project open, memory usage settles at about 38 GB, swapping stops and preview plays smoothly at full resolution.

The improvement came from capacity, not from faster memory: the old machine was limited because the working set no longer fit in RAM, and once it did, the processor and GPU could work at their full speed.