Συστήµατα Αποθήκευσης Pedro Trancoso Τµήµα Πληροφορικής, Πανεπιστήµιο Κύπρου Εισαγωγή Η επίδοση του I/O πειράζει; Throughput and response time CPU performance 60%/year but I/O 10% I/O performance bottleneck: 10% I/O & 10x CPU => 5x perf. (lose 50%) 10% I/O & 100x CPU => 10x perf. (lose 90%) Η επίδοση του CPU πειράζει; Keep CPU busy while doing I/O 1
ιαφορετικά είδη Αποθήκευσης Μαγνητικοί ίσκοι Long-term nonvolatile (διατηρήσιµη) storage for files A level of the memory hierarchy Ορισµοί Platters: 1-12 rotate 3600-15000rpm Diameter: 1.0-3.5in Tracks: 5000-30000/surface Sectors: 100-500/track ίσκοι Χρόνος προσπέλασης: Access Time = Seek Time + Rotation Delay + Transfer Time + Controller Time Παράδειγµα: Average time to read or write 512-byte sector? Advertised average seek time 5ms, transfer rate 40MB/s, rotates 10000rpm, controller overhead 0.1ms 2
ιαφορά µεταξύ Χρόνου Προσπέλασης... Οπτικοί ίσκοι Optical Compact Disk (CD) Digital Video/Versatile Disk (DVD) CD: 4.7-inch, 0.65MB DVD: 4.7-inch, 4.7GB 17GB Record: CD-R, CD-RW ($0.20-$0.60) DVD+R, DVD+RW, DVD-R, DVD-RW, DVD- RAM ($10-$15) 3
Μαγνητική Ταινία Σειριακή προσπέλαση... Παραδοσιακά για εφεδρεία (backup) Automated Tape Libraries Μνήµη Flash Nonvolatile storage for embedded systems Used instead of magnetic storage and as rewritable ROM Access Time Read time as DRAM (16MB 65ns, 128MB 150ns) Write time much larger (need to erase) Παράδειγµα: Compare read and write of 64KB block to Flash and Microdrive disk. Flash: 65ns read 1B, 1.5µs write 1B, 5ms erase 4KB. Microdrive: 1/3 12ms seek time, 3600rpm, 4.2MB/s transfer rate, 0.1ms controller overhead 4
Αρτηρίες Επικοινωνία Μεταξύ I/O, CPU, και Μνήµης Επιλογές για την Αρτηρία: Bus width: separate vs. multiplex address and data lines Data width: wider is faster vs. narrower is cheaper Transfer size: multiple vs. single word Bus masters: multiple vs. single Split Transaction? Yes vs. No Clocking: Synchronous vs. Asynchronous Παραδείγµατα Αρτηρίων: Parallel I/O Busses: IDE/Ultra ATA, SCSI, PCI, PCI-X Serial I/O Busses: I 2 C, 1-wire, RS-232, SPI Προσαρµογή (Interfacing) Polling, Interruptdriven, hybrid 5
Από ευθείας Προσπέλαση Μνήµης (Direct Memory Access DMA) Embedded systems have a rich variety of DMA Αξιοπιστία και ιαθεσιµότητα (Reliability, Availability, and Dependability) Ελαττώµατα, Σφάλµατα, και Βλάβες (faults, errors, and failures): A fault create one or more latent errors Latent error becomes effective once activated An error may cycle between latent and effective states An effective error often propagates from one component to another creating new errors Component failure occurs when the error affects the delivered service Service Specification (1) Service accomplishment (2) Service interruption Transitions: failure (1->2), restoration (2->1) 6
Αξιοπιστία και ιαθεσιµότητα (Reliability, Availability, and Dependability) Παράδειγµα 1: Programming mistake is a fault. The consequence is an error (latent) in the software. Upon activation the error becomes effective. When effective errors produces erroneous data that affects the delivered service, a failure occurs Παράδειγµα 2: Alpha particle hits a DRAM is a fault If it changes the memory it creates an error Error remains latent until it is memory is read If error affects delivered service it results in a failure (ECC would correct error and avoid failure) Αξιοπιστία και ιαθεσιµότητα (Reliability, Availability, and Dependability) Measures of dependability: Module reliability Mean Time To Failure (MTTF) Rate of failure = 1/MTTF Mean Time To Repair (MTTR) Module Availability = MTTF/(MTTF+MTTR) Mean Time Between Failures (MTBF) 7
Αξιοπιστία και ιαθεσιµότητα (Reliability, Availability, and Dependability) Παράδειγµα: Σύστηµα µε 10 disks each with 1.000.000-hour MTTF 1 SCSI controller, 500.000-hour MTTF 1 power supply, 200.000-hour MTTF 1 fan, 200.000-hour MTTF 1 SCSI cable, 1.000.000-hour MTTF Failures are independent Failure rate? System MTTF? Αξιοπιστία και ιαθεσιµότητα (Reliability, Availability, and Dependability) Fault Classification Hardware faults Design faults Operation faults Environment faults Reliability Improvement Fault avoidance: construction Fault tolerance: redundancy Error removal: verification Error forecasting: evaluation 8
RAID 0 και RAID 1 Recommended Applications RAID 0: Video Production and Editing Image Editing Pre-Press Applications Any application requiring high bandwidth RAID 1: Accounting Payroll Financial Any application requiring very high availability RAID 2 και RAID 3 Recommended Applications RAID 3: Video Production and live streaming Image Editing Video Editing Prepress Applications Any application requiring high throughput 9
RAID 4 και RAID 5 Recommended Applications RAID 5: File and Application servers Database servers WWW, E-mail, and News servers Intranet servers Most versatile RAID level RAID 6 10
Writes on RAID 3 vs RAID 4/5 RAID 3 RAID 4 / 5 RAID 4 vs. RAID 5 11
οκιµασία Επιδόσεων (Benchmarks) Transaction Processing Benchmarks TPC-A (debit-credit), 1990: 0.1-10GB TPC-B (batch debit-credit), 1991: 0.1-10GB TPC-C (complex query OLTP), 1992: 100-3000GB TPC-D (decision support), 1995: 100, 300, 1000GB TPC-H (ad hoc decision support), 1999: 100, 300, 1000GB TPC-R (business reporting decision support), 1999: 1000GB TPC-W (transaction Web benchmark), 2000: 50, 500GB SPEC System-Level File System (SFS) and Web Benchmarks Crosscutting Issues DMA and Virtual Memory Asynchronous I/O and Operating Systems Block Servers versus Filers Cache Cause Problems for Operating Systems Stale Data Switches Replacing Buses Replication of Processors for Dependability 12
Designing an I/O System Naïve Design and Cost-Performance Calculating MTTF of First Example Calculating Response Time of First Example More Realistic Design and Cost-Performance Design for Availability Sanyo VPC-SX500 Digital Camera CCD ½-inch, 1360 x 1024 pixel, progressive-scan 4MB frame buffer Save picture in compressed (10x- 20x) format (JPEG) 13
Sanyo VPC-SX500 Digital Camera Πλάνες και Παγίδες (Fallacies and Pitfalls) Fallacy: The rated mean time to failure of disks is 1.200.000 hours or almost 140 years, so disks practically never fail Fallacy: Components fail fast Fallacy: Computers systems achieve 99.999% availability ( five nines ), as advertised Pitfall: Where a function is implemented affects its reliability 14
Πλάνες και Παγίδες (Fallacies and Pitfalls) Fallacy: Semiconductor memory will soon replace magnetic disks in desktop and server computer systems Fallacy: Since head-disk assemblies of disks are the same technology independent of the disk interface, the disk interface matters little in price Fallacy: The time of an average seek of a disk in a computer system is the time for a seek of one-third the number of cylinders Συµπεράσµατα Storage systems become target of innovation and investment Challenge for storage systems today: dependability and maintainability Data is never lost reliability Data is always available availability Disk capacity fastest improving computer technology doubling every year 15