15 Disks
15 Disks
Hard Disk
Drives
Nima Honarmand
(Based on slides by Prof. Andrea Arpaci-Dusseau)
Fall 2017 :: CSE 306
Basic Interface
• Disk has a sector-addressable address space
• Appears as an array of sectors to the OS
Platter
Disk Internals
Fall 2017 :: CSE 306
Spindle
Fall 2017 :: CSE 306
Surface
Surface
Fall 2017 :: CSE 306
23 16
15 8
22 7 0 17
14 9
6 1
13 5 2 10
4 3
21 18
12 11
20 19
23 16
15 8
22 7 0 17
14 9
6 1
13 5 2 10
4 3
21 18
12 11
20 19
Disk Terminology
spindle
read/write head
platter
surface
sector
track
cylinder
Fall 2017 :: CSE 306
Yay!
Fall 2017 :: CSE 306
• https://www.youtube.com/watch?v=L0nbo1VOF4
M
Fall 2017 :: CSE 306
1) Seek Time
• Seek time: function of cylinder distance
• Not purely linear cost
2) Rotation Time
• Depends on disk’s rotational speed: Rotations Per
Minute (RPM)
• 7200 RPM is common, 15000 RPM is high end.
• Average rotation?
• 8.3 ms / 2 = 4.15 ms
Fall 2017 :: CSE 306
3) Transfer Time
• Pretty fast — depends on RPM and sector density.
Workload Performance
• So…
• seeks are slow
• rotations are slow
• transfers are fast
Disk Spec
Cheetah Barracuda
Capacity 300 GB 1 TB
RPM 15,000 7,200
Avg Seek 4 ms 9 ms
Max Transfer 125 MB/s 105 MB/s
Platters 4 4
Cache 16 MB 32 MB
Disk Spec
Cheetah Barracuda
Capacity 300 GB 1 TB
RPM 15,000 7,200
Avg Seek 4 ms 9 ms
Max Transfer 125 MB/s 105 MB/s
Platters 4 4
Cache 16 MB 32 MB
Cheetah Barracuda
RPM 15,000 7,200
Avg Seek 4 ms 9 ms
Max Transfer 125 MB/s 105 MB/s
Seek = 4 ms
Full rotation = 60 / (15,000) = 4 ms
Half rotation = 2 ms
Transfer = 16 KB / 125 MBps = 125 us
Cheetah Barracuda
RPM 15,000 7,200
Avg Seek 4 ms 9 ms
Max Transfer 125 MB/s 105 MB/s
Seek = 9 ms
Full rotation = 60 / (7,200) = 8.3 ms
Half rotation = 4.1 ms
Transfer = 16 KB / 100 MBps = 160 us
Cheetah Barracuda
Capacity 300 GB 1 TB
RPM 15,000 7,200
Avg Seek 4 ms 9 ms
Max Transfer 125 MB/s 105 MB/s
Platters 4 4
Cache 16 MB 32 MB
Cheetah Barracuda
Sequential 125 MB/s 105 MB/s
Random 2.5 MB/s 1.2 MB/s
Other Improvements
• Track Skew
• Zones
• Drive Cache
Fall 2017 :: CSE 306
23 16
15 8
22 17
14 9
13 10
21 18
12 11
20 19
Fall 2017 :: CSE 306
23 16
15 8
22 17
14 9
13 10
21 18
12 11
20 19
Fall 2017 :: CSE 306
21 22
15 8
20 23
14 9
13 10
19 16
12 11
18 17
Fall 2017 :: CSE 306
Other Improvements
• Track Skew
• Zones
• Drive Cache
Fall 2017 :: CSE 306
Other Improvements
• Track Skew
• Zones
• Drive Cache
Fall 2017 :: CSE 306
Drive Cache
• Drives may cache both reads and writes
• OS caches data too
• Disks contain internal memory (2−16MB) used as
cache
• A.k.a. “Track Buffer”
• Provides multiple benefits
1) Read-ahead
• Read contents of entire track into memory during
rotational delay
• Can send them to OS if it asks for them later
Fall 2017 :: CSE 306
Disk Scheduling
Fall 2017 :: CSE 306
Disk Scheduling
• We saw importance of proper request ordering in
our throughput example
• 125 MBps for sequential vs. 2.5 MBps for random
workload
• Disk:
• Positive : knows the geometry
• Negative: can only hold a few
requests to schedule among
Scheduler
• Reality: both — OS picks next few
“good” requests to send to disk; Disk
disk then schedules among them
Fall 2017 :: CSE 306