Powers of Two Table
Use this table for quick approximations of storage and memory calculations: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
Using These Numbers
When performing back-of-the-envelope calculations:- Start with the constraint: Understand the scale (users, requests, data size)
- Use approximations: Round to powers of 2 for easier math
- Work through the math step by step: Show your work to the interviewer
- Validate your assumptions: Check if your numbers make sense
- Consider trade-offs: Use these numbers to justify design decisions
