Your program
Memory (DRAM)
Disk (SSD)⏻ power on
| what happened | real time | at human scale (1 ns → 1 s) |
|---|---|---|
| one memory access | 100 ns | 100 seconds |
| one disk read (4 KB) | 100 µs | 28 hours |
| one network chunk (4 KB) | 10 ms | 4 months |
import numpy, first time — 8 pages from the disk | 800 µs | 9 days |
import numpy, a second program — 8 pages from memory | 800 ns | 13 minutes |
copy dog.png from Google Drive — 8 chunks over the network | 80 ms | 2½ years |
| copy it again — 8 chunks from memory | 1.6 µs | 27 minutes |
the OS writes dog.png to the disk, in the background | 800 µs | 9 days — nobody waits |
| force the write before "done" | 800 µs | 9 days — you wait |
Network