Understanding System Latency: From Nanoseconds to Seconds
What Is Latency in Computing?
Latency refers to the time it takes for an operation to complete. In computing, this can range from a fraction of a nanosecond for CPU operations to several seconds for massive data transfers.
Orders of Magnitude: How Fast is Fast?
Sub-Nanoseconds
- CPU register access — lightning-fast, but extremely limited in capacity.
1–10 Nanoseconds
- L1 and L2 cache access.
- Some CPU instructions.
10–100 Nanoseconds
- L3 cache access.
- Main memory (RAM) access.
Hundreds of Nanoseconds
- Simple system calls (e.g., Linux kernel transition)
Microseconds
- Thread context switches.
- Copying small chunks of memory (e.g., 64KB).
- Data center round-trip network calls (~100–300µs).
Get TechTide’s stories in your inbox
Join Medium for free to get updates from this writer.
Milliseconds
- SSD reads (~0.1ms).
- SSD writes (~1ms).
- TLS handshakes (~100ms+).
- Password hashing (bcrypt, hundreds of ms).
Seconds
- Large file transfers (e.g., 1GB over regional networks ~10s).
Why Relative Differences Matter More Than Exact Numbers
Exact latency numbers change with technology, but the gap between operations remains fairly constant:
- Registers → L1 cache: 10x slower.
- L1 cache → RAM: 100x slower.
- RAM → SSD: Thousands of times slower.
- Local SSD → Network: Orders of magnitude slower still.
Key Insights for System Designers
- Cache Locality is Gold — Data in registers and caches is exponentially faster to access than RAM or disk.
- Minimize Context Switching — Each switch costs microseconds, which adds up in high-frequency workloads.
- Write Costs More Than Read — SSD writes are slower; design write-heavy systems with caution.
- Physics Limits Networking — Fiber optics are fast, but cross-continental latency will always be tens or hundreds of ms.
- Security Adds Overhead — Encryption and hashing are essential but not free.
- Move Data Wisely — Transferring gigabytes takes seconds; consider caching or replication instead.




