Skip to main content
You might be asked to do some estimates by hand during system design interviews. For example, you might need to determine how long it will take to generate 100 image thumbnails from disk or how much memory a data structure will take.
Memorize the Powers of Two table and Latency numbers - they’re essential for quick calculations during interviews.

Powers of Two Table

Use this table for quick approximations of storage and memory calculations:
Source: Powers of two - Wikipedia

Latency Numbers Every Programmer Should Know

These numbers are critical for understanding system performance:

Handy Metrics

Based on the numbers above:
  • Read sequentially from HDD at 30 MB/s
  • Read sequentially from 1 Gbps Ethernet at 100 MB/s
  • Read sequentially from SSD at 1 GB/s
  • Read sequentially from main memory at 4 GB/s
  • 6-7 world-wide round trips per second
  • 2,000 round trips per second within a data center

Latency Numbers Visualized

Latency Visualization

Using These Numbers

When performing back-of-the-envelope calculations:
  1. Start with the constraint: Understand the scale (users, requests, data size)
  2. Use approximations: Round to powers of 2 for easier math
  3. Work through the math step by step: Show your work to the interviewer
  4. Validate your assumptions: Check if your numbers make sense
  5. Consider trade-offs: Use these numbers to justify design decisions
It’s okay to round aggressively during calculations. The goal is to get within the right order of magnitude, not to be perfectly precise.

Additional Resources