IO Cost Model Reference Sheet

Official Formula Reference

This is the authoritative reference for all IO cost calculations used in CS145. Use these formulas and notations in all problems and solutions.

๐Ÿ“„ Download Formula Reference PDF


Quick Reference

Core Formula

IO Cost per Page:

C_r = Access Time + (Page Size รท Scan Speed)
C_w = Access Time + (Page Size รท Scan Speed)

Total IO Cost:

Total Cost = numPages ร— C_r  (for reads)
Total Cost = numPages ร— C_w  (for writes)

Key Variables

Device Specifications (2024)

We use these ballpark numbers for PSETs and Tests. Easy for math in Tests. In real life, different manufacturers will have different costs and speeds for commercial servers.

Device Access Time Scan Speed C_r (64MB page) C_w (64MB page)
RAM 100 ns 100 GB/s 0.00064s 0.00064s
SSD 10 ฮผs 5 GB/s 0.01281s 0.01281s
HDD 10 ms 100 MB/s 0.65s 0.65s
Network 1 ฮผs 10 GB/s 0.00641s 0.00641s

Unit Conventions

โ€ข MB, GB = Decimal units (1000-based): 1 MB = 1,000,000 bytes, 1 GB = 1,000,000,000 bytes
โ€ข MiB, GiB = Binary units (1024-based): 1 MiB = 1,048,576 bytes, 1 GiB = 1,073,741,824 bytes

All CS145 problems use MB/GB (decimal) consistently for calculations.

This reference sheet is used throughout all system problems and solutions.