Download presentation
Presentation is loading. Please wait.
Published byGiles Francis Modified over 8 years ago
1
COSC 6340: Disks 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
COSC 6340: Disks 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. 10000 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).
3
COSC 6340: Disks 3 Components of a Disk Platters v The platters spin (say, 90rps). Spindle v The arm assembly is moved in or out to position a head on a desired track. Tracks under heads make a cylinder (imaginary!). Disk head Arm movement Arm assembly v Only one head reads/writes at any one time. Tracks Sector v Block size is a multiple of sector size (which is fixed).
4
COSC 6340: Disks 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
5
COSC 6340: Disks 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) source: www.seagate.com Latency = Queuing Time + Controller time + Seek Time + Rotation Time + Size / Bandwidth per access per byte { + Sector Track Cylinder Head Platter Arm Track Buffer
6
COSC 6340: Disks 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 + 0.5 * 1/(7200 RPM) + 64 KB / (65 MB/s) + 0.1 ms = 7.4 ms + 0.5 /(7200 RPM/(60000ms/M)) + 64 KB / (65 KB/ms) + 0.1 ms = 7.4 + 4.2 + 1.0 + 0.1 ms = 12.7 ms
7
COSC 6340: Disks 7 1 inch disk drive! 2000 IBM 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
COSC 6340: Disks 8 Disk Characteristics in 2000 $447$435$828
9
COSC 6340: Disks 9 Disk Characteristics in 2000
10
COSC 6340: Disks 10 Disk Characteristics in 2000
11
COSC 6340: Disks 11 Disk Characteristics in 2000
12
COSC 6340: Disks 12 RAID Technology Disk Array: Arrangement of several disks that gives abstraction of a single, large disk. Goals: Increase performance and reliability. Two main techniques: » Data striping: Data is partitioned; size of a partition is called the striping unit. Partitions are distributed over several disks. » Redundancy: More disks more failures. Redundant information allows reconstruction of data if a disk fails.
Similar presentations
© 2024 SlidePlayer.com Inc.
All rights reserved.