Post

Components - RAM

Components - RAM

๐Ÿง  Main Memory (RAM)

A clean, developer-friendly explanation of main memory types, performance characteristics, and what actually matters in real systems.
This version replaces Markdown tables with HTML tables to prevent GitHub/Jekyll rendering issues.


๐Ÿ“Œ Why Main Memory Matters

Main memory (RAM) strongly impacts system performance because it:

  • Feeds data to the CPU
  • Determines multitasking smoothness
  • Affects compile time, VMs, IDEs, gaming, and servers

A fast CPU is limited by slow memory.


๐Ÿงฑ 1. RAM Fundamentals

๐Ÿ”น DRAM (Dynamic RAM)

  • Data decays over time
  • Requires periodic refresh
  • High density โ†’ cheap & large capacity
  • Used as system main memory

Pros

โœ” Large capacity
โœ” Low cost

Cons

โŒ Slower than SRAM
โŒ Refresh overhead


๐Ÿ”น SRAM (Static RAM)

  • Data remains stable without refresh
  • Lower latency & faster
  • Higher power & cost
  • Low density โ†’ not suitable for large capacity

๐Ÿ“Œ Used mainly for CPU Cache (L1/L2/L3)


๐Ÿง  2. SDRAM & DDR Evolution

๐Ÿ”น SDRAM

  • Synchronized with system clock
  • Faster burst transfers than DRAM

๐Ÿ”น DDR SDRAM (Double Data Rate)

Transfers data on both clock edges, doubling bandwidth.

DDR Generations & Bandwidth

GenerationEffective BandwidthTypical Use
DDR2ร—Legacy
DDR24ร—Older systems
DDR38ร—Still common
DDR416ร—Modern mainstream
DDR5HigherNew platforms

โšก 3. Memory Performance โ€” What Really Matters

๐Ÿ”น Bandwidth

  • How much data can be transferred per second
  • Impacts streaming workloads (ML, video, rendering)

๐Ÿ”น Latency

  • How long before first byte arrives
  • Impacts random access workloads (games, compilers)

Latency = responsiveness, Bandwidth = throughput


๐Ÿงฉ 4. RAM Specs Developers Should Understand

Key RAM Specifications

SpecMeaningWhy It Matters
Frequency (MHz)Transfer speedHigher bandwidth
CAS Latency (CL)Delay cyclesLower = faster
ChannelsParallel lanesMore throughput
Capacity (GB)Total memory sizePrevents swapping
Rank / DIMM LayoutInternal memory parallelismAffects speed

๐Ÿง  5. Memory Channels & Parallelism

๐Ÿ”น Single vs Dual Channel

  • Dual-channel = 2ร— memory bus width
  • Improves real performance in:
    • Games
    • Compilers
    • ML workloads

Example: 2ร—8GB often outperforms 1ร—16GB


๐Ÿงต 6. Memory Access Patterns (Developer-Relevant)

๐Ÿ”น Sequential Access

  • Cache-friendly
  • Fast

๐Ÿ”น Random Access

  • Cache-miss heavy
  • Slower

๐Ÿ“Œ Performance depends heavily on cache locality & prefetch behavior


๐Ÿ’พ 7. Virtual Memory & Swap Impact

If RAM runs out:

  • OS swaps memory to SSD/HDD
  • Performance drops dramatically

Running out of RAM hurts more than having a slower CPU.


๐Ÿง  8. ECC Memory (Reliability)

ECC = Error Correcting Code

  • Detects & corrects bit flips
  • Used in servers & workstations
  • Slight performance overhead

โš™ 9. NUMA (Advanced โ€” Servers)

NUMA = Non-Uniform Memory Access

  • Accessing local RAM is faster
  • Important in multi-socket servers & HPC

๐ŸŽฏ Developer Takeaways

โœ” More RAM helps when memory-bound
โœ” Latency matters more than MHz in real apps
โœ” Dual-channel improves throughput
โœ” Avoid random memory access patterns
โœ” Capacity prevents slow swapping


This post is licensed under CC BY 4.0 by the author.