Download presentation
Presentation is loading. Please wait.
Published byGabriel Hood Modified over 6 years ago
1
Disks and Files DBMS stores information on (“hard”) disks.
This has major implications for DBMS design! READ: transfer data from disk to main memory (RAM). WRITE: transfer data from RAM to disk. Both are high-cost operations, relative to in-memory operations, so must be planned carefully!
2
Why Not Store Everything in Main Memory?
Costs too much. $100 will buy you either 512MB of RAM or 50GB of disk today --- that is disk storage 100 times cheaper (but it is approx times slower). Main memory is volatile. We want data to be saved between runs. (Obviously!) Typical storage hierarchy: Main memory (RAM) for currently used data. Disk for the main database (secondary storage). Tapes for archiving older versions of the data (tertiary storage). 19
3
Components of a Disk The platters spin (say, 90rps).
Spindle Tracks Disk head The platters spin (say, 90rps). The arm assembly is moved in or out to position a head on a desired track. Tracks under heads make a cylinder (imaginary!). Sector Arm movement Platters Only one head reads/writes at any one time. Arm assembly Block size is a multiple of sector size (which is fixed). 21
4
Accessing a Disk Page Time to access (read/write) a disk block:
seek time (moving arms to position disk head on track) rotational delay (waiting for block to rotate under head) transfer time (actually moving data to/from disk surface) Seek time and rotational delay dominate. Seek time varies from about 1 to 20msec Rotational delay varies from 0 to 10msec Transfer rate is about 1msec per 32KB page 22
5
State of the Art: Barracuda 180
181.6 GB, 3.5 inch disk 12 platters, 24 surfaces 24,247 cylinders 7,200 RPM; (4.2 ms avg. latency) 7.4/8.2 ms avg. seek (r/w) 64 to 35 MB/s (internal) 0.1 ms controller time 10.3 watts (idle) Track Sector Cylinder Track Buffer Arm Platter Head Latency = Queuing Time + Controller time + Seek Time + Rotation Time + Size / Bandwidth per access per byte { + 47 to 26 MB/s (external) source:
6
Disk Performance Calculate time to read 64 KB (128 sectors) for Barracuda 180 X using advertised performance; sector is on outer track Disk latency = average seek time + average rotational delay + transfer time + controller overhead = 7.4 ms * 1/(7200 RPM) KB / (65 MB/s) ms = 7.4 ms /(7200 RPM/(60000ms/M)) KB / (65 KB/ms) ms = ms = 12.7 ms
7
1 inch disk drive! 2000 IBM MicroDrive: 2006 MicroDrive?
1.7” x 1.4” x 0.2” 1 GB, 3600 RPM, 5 MB/s, 15 ms seek Digital camera, PalmPC? 2006 MicroDrive? 9 GB, 50 MB/s! Assuming it finds a niche in a successful product Assuming past trends continue
8
Disk Characteristics in 2000
$828 $447 $435
9
Disk Characteristics in 2000
10
Disk Characteristics in 2000
11
Disk Characteristics in 2000
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.