Beruflich Dokumente
Kultur Dokumente
1
Why Not Store Everything in Main Memory?
Disks
2
Components of a Disk Spindle
Tracks
Disk head
3
Arranging Pages on Disk
4
Summary
Disk Drives
Mechanism + Controller
Mechanism: recording and positioning
– A single read-write data channel can be switched
between the heads on multiple platters.
– Seeking, Zoning, Track skewing, Sparing, etc.
Controller: microprocessor, buffer memory,
interface to SCSI bus.
– Interpret SCSI requests, transfer data between the
disk drive and and its clients.
– Bus interface, Caching, etc.
5
Seeking
A Seek is composed of
– speedup, coast, slowdown, and settle.
Average seek time (published) is misleading.
– Very short seeks (less than 2-4 cyl.) dominated by
settle time (1-3 milliseconds).
– Short seeks (less than 200-400 cyl.) spend most time in
speedup phase, proportional to SQRT(seekDistance).
– Long seeks spend most time in coast phase,
proportional to seekDistance plus constant.
Data Layout
Zoning for maximum storage capacity
– Adjacent cylinders grouped into (typically 3-20) zones.
– Outer zones have more sectors per track, higher data transfer rate
(same density, longer track).
(E.g.) HP C2240 disk yields different access rates (3.1 – 5.3 MB/sec)
from different zones.
Track skewing for faster access across track and cylinder
boundaries.
– Skew amount is determined by seek time and RPM.
– Each zone may have its own track skew factor.
Mapping from a linear vector of logical blocks to physical
sectors on disk
– Vertical mapping vs. horizontal mapping
6
Bus Interface
7
Caching for Speed-matching
8
Modeling Disk Drives
Modeling head-
positioning effects for
HP C2200A
Non-linear seek time
– Seek-time(d) = 3.45 +
0.597*d1/2 if d < 616
– Seek-time(d) = 10.8 +
0.012*d if d ≥ 616
9
Modeling Disk Drives
No cache Cache
Database Systems Implementation, Bongki Moon 20
10
Modeling Disk Drives
11
Performance Trend of Disk
From 1983 to 2003
– Capacity increased about 2500 times (73.4/0.03).
– Bandwidth improved 143.3 times (86/0.6).
– Latency improved 8.5 times (48.3/5.7).
12
So What?
The trouble is
– Latency remains important for interactive applications
(e.g., ad-hoc query response time).
– The bandwidth-latency imbalance may be even more
evident in the future.
Some suggestions for hiding latency
– Usual stuff: caching and prefetching
– Use LFS instead of traditional file systems.
LFS tied up to bandwidth, while update-in-place to latency
– Use large block sizes.
13