Transcript I/O & Disks

ENGS 116 Lecture 17
1
Introduction to I/O
Vincent Berk
November 19, 2008
Reading for today: Sections 4.4 – 4.9
Reading for Monday: Sections 6.1 – 6.4
Reading for next Monday: Sections 6.5 – 6.9
Homework for Friday: 5.4, 5.6, 5.10, 4.1, 4.17
ENGS 116 Lecture 17
2
The Big Picture: Where are we now?
Processor
Control
Input
Memory
Datapath
Output
ENGS 116 Lecture 17
3
I/O Systems
ENGS 116 Lecture 17
4
Storage System Issues
• Historical Context of Storage I/O
• Secondary and Tertiary Storage Devices
• Storage I/O Performance Measures
• A Little Queueing Theory
• Processor Interface Issues
• I/O Buses
• Redundant Arrays of Inexpensive Disks (RAID)
• I/O Benchmarks
ENGS 116 Lecture 17
Motivation: Who Cares About I/O?
• CPU Performance: 50% to 100% per year
• I/O system performance limited by mechanical delays
< 5% per year (IO per sec or MB per sec)
• Amdahl's Law: system speed-up limited by the slowest part!
10% IO & 10x CPU => 5x Performance (lose 50%)
10% IO & 100x CPU => 10x Performance (lose 90%)
• I/O bottleneck:
Diminishing fraction of time in CPU
Diminishing value of faster CPUs
5
ENGS 116 Lecture 17
6
Technology Trends
• Today: Processing power doubles every 18 months
• Today: Memory size doubles every 18 months (4X/3 yrs)
• Today: Disk capacity doubles every 18 months
• Disk positioning rate (seek + rotate) doubles every ten years!
The I/O
GAP
ENGS 116 Lecture 17
7
Storage Technology Drivers
• Driven by the prevailing computing paradigm
– 1950s: migration from batch to on-line processing
– 1990s: migration to ubiquitous computing
• computers in phones, books, cars, video cameras, …
• nationwide fiber optical network with wireless tails
• Effects on storage industry:
– Embedded storage
• smaller, cheaper, more reliable, lower power
• Interesting twist: Apple I-pod
– Data utilities
• high capacity, hierarchically managed storage
ENGS 116 Lecture 17
8
Historical Perspective
• 1956 IBM Ramac — early 1970s Winchester
– Developed for mainframe computers, proprietary interfaces
– Steady shrink in form factor: 27 in. to 14 in.
• 1970s developments
– 5.25-inch floppy disk form factor
– early emergence of industry standard disk interfaces
• ST506, SASI, SMD, ESDI
• Early 1980s
– PCs and first generation workstations
• Mid 1980s
– Client/server computing
– Centralized storage on file server
• accelerates disk downsizing: 8 inch to 5.25 inch
– Mass market disk drives become a reality
• industry standards: SCSI, IDE, SATA
• 5.25-inch drives for standalone PCs, end of proprietary interfaces
ENGS 116 Lecture 17
9
Disk History
Data
density
Mbit/sq. in.
Capacity of
Unit Shown
Megabytes
1973:
1. 7 Mbit/sq. in
140 MBytes
1979:
7. 7 Mbit/sq. in
2,300 MBytes
Source: New York Times, 2/23/98, page C3,
“Makers of disk drives crowd even more data into even smaller spaces”
ENGS 116 Lecture 17
10
Historical Perspective
• Late 1980s/Early 1990s:
– Laptops, notebooks, (palmtops)
– 3.5 inch, 2.5 inch, 1.8 inch formfactors
– Formfactor plus capacity drives market, not so much performance
• Recently Bandwidth improving at 40%/ year
– Challenged by DRAM, flash RAM in PCMCIA cards
• still expensive, Intel promises but doesn’t deliver
• unattractive MBytes per cubic inch
– Optical disk fails on performance (e.g., NEXT) but finds niche (CD
ROM)
ENGS 116 Lecture 17
11
Disk History
1989:
63 Mbit/sq. in
60,000 MBytes
1997:
1450 Mbit/sq. in
2300 MBytes
1997:
3090 Mbit/sq. in
8100 MBytes
Source: New York Times, 2/23/98, page C3,
“Makers of disk drives crowd even more data into even smaller spaces”
ENGS 116 Lecture 17
12
Alternative Data Storage Technologies: Early 1990s
Cap
(MB)
BPI
TPI
12000
22860
104
38
43200
61000
1638
1870
Magnetic & Optical Disk:
Hard Disk (5.25") 1200
IBM 3390 (10.5") 3800
33528
27940
Sony MO (5.25") 640
24130
Technology
Conventional Tape:
Cartridge (.25")
150
IBM 3490 (.5")
800
Helical Scan Tape:
Video (8mm)
4600
DAT (4mm)
1300
D-3 (1/2")
20,000
Data
BPI*TPI Transfer Access
(Million) (KByte/s) Time
1.2
0.9
92
3000
minutes
seconds
71
114
492
183
45 secs
20 secs
15 secs?
1880
2235
63
62
3000
4250
18796
454
88
18 ms
20 ms
100 ms
ENGS 116 Lecture 17
13
Devices: Magnetic Disks
Track
• Purpose:
Sector
– Long-term, nonvolatile storage
– Large, inexpensive, slow level in the
Cylinder
storage hierarchy
• Characteristics:
Platter
Head
– Seek Time (~ 8 ms avg)
• positional latency
7200 RPM = 120 RPS  8 ms per rev
avg. rot. latency = 4 ms
• rotational latency
128 sectors per track  0.0625 ms per sector
• Transfer rate
1 KB per sector  16 MB / s
– About a sector per ms (10-40 MB/s)
– Blocks
• Capacity
Response time
= Queue + Controller + Seek + Rot + Transfer
– Gigabytes
– Quadruples every 3 years
Service time
ENGS 116 Lecture 17
14
Disk Device Terminology
Sector
Inner Track
Head
Outer Track
Platter
Arm
Actuator
Disk Latency = Queueing Time + Controller Time + Seek Time
+ Rotation Time + Transfer Time
Order-of-magnitude times for 4K byte transfers:
Seek: 8 ms or less
Rotate: 4.2 ms @ 7200 rpm
Transfer: 1 ms @ 7200 rpm
ENGS 116 Lecture 17
15
Disk Device Terminology
ENGS 116 Lecture 17
16
Tape vs. Disk
• Longitudinal tape uses same technology as hard disk;
tracks its density improvements
• Disk head flies above surface, tape head lies on surface
• Inherent cost-performance based on geometries:
fixed rotating platters with gaps
(random access, limited area, 1 media / reader)
vs.
removable long strips wound on spool
(sequential access, "unlimited" length, multiple / reader)
• Modern technology:
Helical Scan (VCR, Camcorder, DAT)
Spins head at angle to tape to improve density
ENGS 116 Lecture 17
17
R-DAT Technology
Rotary Drum
R
W
W
R
2000 RPM
90° Wrap Angle
Drum Direction
of
Tape
Track
Four Head Recording
Tracks Recorded ± 20° w/o guard band
Read After Write Verify
Helical Recording Scheme
ENGS 116 Lecture 17
18
Example: R-DAT Technology
• Rotating (vs. Stationary) head (Digital Audio Tape)
• Highest areal recording density commercially available
• High density due to:
– high coercivity metal tape
– helical scan recording method
– narrow, gapless (overlapping) recording tracks
•
10X improvement capacity & transfer rate by 1999
– faster tape and drum speeds
– greater track overlap
• No significant changes since late 90s
ENGS 116 Lecture 17
19
R-DAT Technology
DDS ANSI Standard (HP, SONY)
Track
Tape
Frame
65% of Track is Data Area
70% Data Bytes
30% Bytes Parity Plus
Reed-Solomon Codes
Track Finding Area (Servo)
Subcode Area (Index)
Margin Area
Block
Track (2900 Data Bytes)
Frame (2 Tracks)
Group (22 Frames + Optional Group ECC, 128 K bytes)
Theoretical Bit Error Rates:
• w/o group ECC: one in 1026
• w/ group ECC: one in 1033
ENGS 116 Lecture 17
20
Current Drawbacks to Tape
• Tape wears out:
– Helical 100s of passes to 1000s for longitudinal
• Head wears out:
– 2000 hours for helical
• Both must be accounted for in economic/reliability model
• Long rewind, eject, load, spin-up times;
not inherent, just no need in marketplace (so far)
• Designed for archival storage
• Capacities: 700 GB per tape, but used in big libraries (150 PB)
ENGS 116 Lecture 17
21
Modern Day Tape specs.
• Sun StorageTek SL
8500 tape library
– Up to 150,000 TB of
archival storage
– With 2,048 drives:
884.7 TB/hr
– 60 minutes to read
entire library
– 11 seconds to find
and load any type in
library
ENGS 116 Lecture 17
22
Optical Disks: CD-ROM vs. DVD
• Both 12 cm in diameter (most-common size for CD-ROM)
• CD-ROM
– Maximum 80 minutes of music
– 700 MB of information
• DVD (Digital Versatile/Video Disk)
– 4.7 GB of information on one of its two sides — enough for 133minute movie
– With 2 layers on each of its two sides, will hold up to 17 gigabytes
– Uses MPEG-2 file compression standard
• Blue Ray DVD (higher density)
– Up to 200 GB of capacity per disc
ENGS 116 Lecture 17
23
Disk I/OPerformance
Metrics:
Response Time
Throughput
Queue
Proc
IOC
Device
Response time = Queue + Device Service time
ENGS 116 Lecture 17
24
Response Time vs. Productivity
• Interactive environments:
Each interaction or transaction has 3 parts:
– Entry Time: time for user to enter command
– System Response Time: time between user entry & system replies
– Think Time: Time from response until user begins next command
1st transaction
2nd transaction
• What happens to transaction time as system response time shrinks
from 1.0 sec to 0.3 sec?
– With keyboard: 4.0 sec entry, 9.4 sec think time
– With graphics: 0.25 sec entry, 1.6 sec think time
ENGS 116 Lecture 17
25
Response Time & Productivity
conventional
0.3s
conventional
1.0s
graphics
0.3s
graphics
1.0s
entry
0.00
5.00
resp
10.00
think
15.00
Time
• 0.7 sec off response saves 4.9 sec (34%) and 2.0 sec (70%) total time
per transaction => greater productivity
• Another study: everyone gets more done with faster response, but
novice with fast response = expert with slow
ENGS 116 Lecture 17
26
Response Time & Productivity
ENGS 116 Lecture 17
27
Disk Time Example
• Disk parameters:
–
–
–
–
Transfer size is 8K bytes
Advertised average seek is 12 ms
Disk spins at 7200 RPM
Transfer rate is 4 MB/sec
• Controller overhead is 2 ms
• Assume that disk is idle so no queueing delay
• What is average disk access time for a sector?
– Avg seek + avg rotational delay + transfer time + controller overhead
– 12 ms + 0.5/(7200 RPM/60) + 8 KB/4 MB/s + 2 ms
– 12 + 4.15 + 2 + 2 = 20 ms
• Advertised seek time assumes no locality: typically 1/4 to 1/3
advertised seek time: 20 ms => 12 ms
ENGS 116 Lecture 17
28
The following simplified diagram shows two potential ways of numbering
the sectors of data on a disk (only two tracks are shown and each track
has eight sectors). Assuming that typical reads are contiguous (e.g., all 16
sectors are read in order), which way of numbering the sectors will be
likely to result in higher performance? Why?
0
0
1
7
8
14
9
15
15
13
2
10
14
6
1
7
12
6
9
11
13
12
5
11
10
3
3
5
4
2
8
4
ENGS 116 Lecture 17
29
Processor Interface Issues
• Interconnections
– Busses
• Processor Interface
– Interrupts
– Memory mapped I/O
• I/O Control Structures
– Polling
– Interrupts
– DMA
– I/O controllers
– I/O processors
• Capacity, Access Time, Bandwidth
ENGS 116 Lecture 17
30
Busses
• Bus: a shared communication link between subsystems
• Disadvantage: a communication bottleneck, possibly limiting the
maximum I/O throughput
• Bus speed is limited by physical factors
• Two generic types of busses
– I/O
– CPU-memory
• Bus transaction: sending address & receiving or sending data
ENGS 116 Lecture 17
31
Bus Options
Option
High performance
Low cost
Bus width
Separate address
& data lines
Multiplex address
& data lines
Data width
Wider is faster
Narrower is cheaper
(e.g., 32 bits)
(e.g., 8 bits)
Multiple words has
Single-word transfer
less bus overhead
is simpler
Multiple
Single master
(requires arbitration)
(no arbitration)
Yes — separate
Request and Reply
No — continuous
connection is cheaper
packets for higher
bandwidth
and has lower latency
Transfer size
Bus masters
Split
transaction?
(needs multiple masters)
Clocking
Synchronous
Asynchronous
ENGS 116 Lecture 17
32
I/O Interface
CPU
Memory
Independent I/O bus
Memory
bus
Common memory
& I/O bus
Memory
Interface
Interface
Peripheral
Peripheral
Separate I/O instructions (in, out)
CPU
40 Mbytes/sec
optimistically
Interface
Interface
Peripheral
Peripheral
VME bus
Multibus-II
Nubus
10 MIP processor
completely
saturates the bus!
ENGS 116 Lecture 17
33
Backplane bus
Processor
a.
Memory
I/O devices
Processor-memory bus
Memory
Processor
Bus
adapter
Bus
adapter
I/O
bus
Bus
adapter
I/O
bus
I/O
bus
b.
Processor-memory bus
Processor
Bus
adapter
Backplane
bus
c.
Bus
adapter
Bus
adapter
I/O bus
I/O bus
Memory