Readings. Storage Hierarchy III: I/O System. I/O (Disk) Performance. I/O Device Characteristics. often boring, but still quite important

Similar documents
Computer Science 146. Computer Architecture

Computer Organization and Structure. Bing-Yu Chen National Taiwan University

Administrivia. CMSC 411 Computer Systems Architecture Lecture 19 Storage Systems, cont. Disks (cont.) Disks - review

Storage. Hwansoo Han

Where We Are in This Course Right Now. ECE 152 Introduction to Computer Architecture Input/Output (I/O) Copyright 2012 Daniel J. Sorin Duke University

Storage Systems. Storage Systems

Storage systems. Computer Systems Architecture CMSC 411 Unit 6 Storage Systems. (Hard) Disks. Disk and Tape Technologies. Disks (cont.

Lecture 23: Storage Systems. Topics: disk access, bus design, evaluation metrics, RAID (Sections )

Computer Architecture Computer Science & Engineering. Chapter 6. Storage and Other I/O Topics BK TP.HCM

Chapter Seven Morgan Kaufmann Publishers

Chapter 6. Storage & Other I/O

Lecture 23: I/O Redundant Arrays of Inexpensive Disks Professor Randy H. Katz Computer Science 252 Spring 1996

Thomas Polzer Institut für Technische Informatik

Virtual Memory. Reading. Sections 5.4, 5.5, 5.6, 5.8, 5.10 (2) Lecture notes from MKP and S. Yalamanchili

Chapter 6. Storage and Other I/O Topics

Chapter 6. Storage and Other I/O Topics

I/O CANNOT BE IGNORED

Chapter 6. Storage and Other I/O Topics. ICE3003: Computer Architecture Fall 2012 Euiseong Seo

INPUT/OUTPUT DEVICES Dr. Bill Yi Santa Clara University

I/O CANNOT BE IGNORED

Storage. CS 3410 Computer System Organization & Programming

Introduction I/O 1. I/O devices can be characterized by Behavior: input, output, storage Partner: human or machine Data rate: bytes/sec, transfers/sec

I/O, Disks, and RAID Yi Shi Fall Xi an Jiaotong University

CSE 120. Operating Systems. March 27, 2014 Lecture 17. Mass Storage. Instructor: Neil Rhodes. Wednesday, March 26, 14

Chapter 8. A Typical collection of I/O devices. Interrupts. Processor. Cache. Memory I/O bus. I/O controller I/O I/O. Main memory.

Input/Output Introduction

Introduction. Motivation Performance metrics Processor interface issues Buses

Chapter 6. Storage and Other I/O Topics

Chapter 6 Storage and Other I/O Topics

Introduction to Input and Output

Lecture 23. Finish-up buses Storage

Computer Systems Laboratory Sungkyunkwan University

CSCI-GA Database Systems Lecture 8: Physical Schema: Storage

Chapter 6. Storage and Other I/O Topics. Jiang Jiang

Lecture 13. Storage, Network and Other Peripherals

CPS104 Computer Organization and Programming Lecture 18: Input-Output. Outline of Today s Lecture. The Big Picture: Where are We Now?

Storage System COSC UCB

Chapter 12: Mass-Storage

V. Mass Storage Systems

Lectures More I/O

Introduction Disks RAID Tertiary storage. Mass Storage. CMSC 420, York College. November 21, 2006

Reading and References. Input / Output. Why Input and Output? A typical organization. CSE 410, Spring 2004 Computer Systems

Chapter 10: Mass-Storage Systems

Appendix D: Storage Systems

Chapter 10: Mass-Storage Systems. Operating System Concepts 9 th Edition

CS152 Computer Architecture and Engineering Lecture 19: I/O Systems

UNIVERSITY OF MASSACHUSETTS Dept. of Electrical & Computer Engineering. Computer Architecture ECE 568

ECE 250 / CPS 250 Computer Architecture. Input/Output

Chapter 6. Storage and Other I/O Topics

Chapter 6. Storage and Other I/O Topics. ICE3003: Computer Architecture Spring 2014 Euiseong Seo

Where We Are in This Course Right Now. ECE 152 Introduction to Computer Architecture Input/Output (I/O) Copyright 2011 Daniel J. Sorin Duke University

Che-Wei Chang Department of Computer Science and Information Engineering, Chang Gung University

Chapter 10: Mass-Storage Systems

Key Points. Rotational delay vs seek delay Disks are slow. Techniques for making disks faster. Flash and SSDs

CS3600 SYSTEMS AND NETWORKS

Mass-Storage Structure

Some material adapted from Mohamed Younis, UMBC CMSC 611 Spr 2003 course slides Some material adapted from Hennessy & Patterson / 2003 Elsevier

Chapter 6. I/O issues

UNIVERSITY OF MASSACHUSETTS Dept. of Electrical & Computer Engineering. Computer Architecture ECE 568

CSE 120. Overview. July 27, Day 8 Input/Output. Instructor: Neil Rhodes. Hardware. Hardware. Hardware

UC Santa Barbara. Operating Systems. Christopher Kruegel Department of Computer Science UC Santa Barbara

Computer Architecture. Hebrew University Spring Chapter 8 Input/Output. Big Picture: Where are We Now?

Secondary storage. CS 537 Lecture 11 Secondary Storage. Disk trends. Another trip down memory lane

Introduction to I/O. April 30, Howard Huang 1

Mass-Storage. ICS332 - Fall 2017 Operating Systems. Henri Casanova

I/O Systems. EECC551 - Shaaban. Processor. Cache. Memory - I/O Bus. Main Memory. I/O Controller. I/O Controller. I/O Controller. Graphics.

Data Storage and Query Answering. Data Storage and Disk Structure (2)

Storage Technologies and the Memory Hierarchy

High-Performance Storage Systems

Disks and RAID. CS 4410 Operating Systems. [R. Agarwal, L. Alvisi, A. Bracy, E. Sirer, R. Van Renesse]

Mass-Storage Structure

IO System. CP-226: Computer Architecture. Lecture 25 (24 April 2013) CADSL

Mass-Storage Systems. Mass-Storage Systems. Disk Attachment. Disk Attachment

CSE 153 Design of Operating Systems

Concepts Introduced. I/O Cannot Be Ignored. Typical Collection of I/O Devices. I/O Issues

Database Management Systems, 2nd edition, Raghu Ramakrishnan, Johannes Gehrke, McGraw-Hill

u Covered: l Management of CPU & concurrency l Management of main memory & virtual memory u Currently --- Management of I/O devices

CS370 Operating Systems

Database Systems II. Secondary Storage

Chapter 12: Mass-Storage

Chapter 11. I/O Management and Disk Scheduling

Chapter 12: Mass-Storage

Quiz for Chapter 6 Storage and Other I/O Topics 3.10

Computer Science 61C Spring Friedland and Weaver. Input/Output

Computer Organization

CS252 S05. CMSC 411 Computer Systems Architecture Lecture 18 Storage Systems 2. I/O performance measures. I/O performance measures

Input/Output. Today. Next. Principles of I/O hardware & software I/O software layers Disks. Protection & Security

COS 318: Operating Systems. Storage Devices. Vivek Pai Computer Science Department Princeton University

CS143: Disks and Files

CISC 7310X. C11: Mass Storage. Hui Chen Department of Computer & Information Science CUNY Brooklyn College. 4/19/2018 CUNY Brooklyn College

Virtual Memory Input/Output. Admin

Contents. Memory System Overview Cache Memory. Internal Memory. Virtual Memory. Memory Hierarchy. Registers In CPU Internal or Main memory

CS 341l Fall 2008 Test #4 NAME: Key

UNIVERSITY OF MASSACHUSETTS Dept. of Electrical & Computer Engineering. Computer Architecture ECE 568

CSE325 Principles of Operating Systems. Mass-Storage Systems. David P. Duggan. April 19, 2011

CHAPTER 12: MASS-STORAGE SYSTEMS (A) By I-Chen Lin Textbook: Operating System Concepts 9th Ed.

Introduction to I/O and Disk Management

Module 6: INPUT - OUTPUT (I/O)

Introduction to I/O and Disk Management

Operating Systems 2010/2011

Transcription:

Storage Hierarchy III: I/O System Readings reg I$ D$ L2 L3 memory disk (swap) often boring, but still quite important ostensibly about general I/O, mainly about disks performance: latency & throughput disks parameters extensions redundancy and RAID buses I/O system architecture DMA and I/O processors current research in I/O systems H+P chapter 7 (note that we ve temporarily skipped chapter 6) Readings in Computer Architecture [optional!] Smotherman: A Sequencing-Based Taxonomy of I/O Systems and Review of Historical Machines Patterson, Gibson, and Katz: A Case for Redundant Arrays of Inexpensive Disks (RAID) Recent Research Paper Buonadonna and Culler: QPIP 1 2 I/O (Disk) Performance I/O Device Characteristics who cares? you do remember Amdahl s Law want fast disk access (fast swap, fast file reads) I/O performance metrics bandwidth of requests: I/Os per second (IOPS) raw data bandwidth: bytes per second latency: response time is I/O (disk) latency important? why not just context-switch? context-switching isn t fast (although faster than disk access) context-switching requires jobs to context-switch to context-switching annoys users (productivity = f(1/response time)) type input: read only output: write only storage: both partner human machine data rate peak transfer rate device type partner data rate KB/s mouse I human 0.01 CRT O human 60,000 modem I/O machine 2-8 LAN I/O machine 500-6000 tape storage machine 2000 disk storage machine 2000-10,000 3 4

Disk Parameters Disk Performance head sector spindle platter track 1 20 platters (data on both sides) magnetic iron-oxide coating 1 read/write head per side 500 2500 tracks per platter 32 128 sectors per track sometimes fewer on inside tracks 512 2048 bytes per sector usually fixed number of bytes/sector data + ECC (parity) + gap 4 24GB total 3000 10000 RPM t disk = t seek + t rotation + t transfer + t controller + t queuing t seek (seek time): move head to track t rotation (rotational latency): wait for sector to come around average t rotation = 0.5 / RPS // (RPS = RPM / 60) t transfer (transfer time): read disk rate transfer = (bytes/sector * sector/track * RPS) t transfer = bytes transferred / rate transfer t controller (controller delay): wait for controller to do its thing t queuing (queueing delay): wait for older requests to finish not a fixed latency - depends on older requests 5 6 Disk Performance Example Disk Performance: Queuing Theory parameters 3600 RPM 60 RPS (may help to think in units of tracks/sec) avg seek time: 9ms 100 sectors per track, 512 bytes per sector controller + queuing delays: 1ms Q: average time to read 1 sector (512 bytes)? rate transfer = 100 sectors/track * 512 B/sector * 60 RPS = 2.4 MB/s t transfer = 512 B / 2.4 MB/s = 0.2ms t rotation =.5 / 60 RPS = 8.3ms t disk = 9ms (seek) + 8.3ms (rotation) + 0.2ms (xfer) + 1ms = 18.5ms t transfer is only a small component! counter-intuitive? end of story? no! t queuing not fixed (gets longer with more requests) I/O is a queuing system in equilibrium: rate arrival = rate departure total time t system = t queue + t server Little s Law: rate arrival * t system = QueueLength system LL corollary: rate arrival * t server = utilization server the important result (derivation in H+P) t queue = t server * utilization server / (1 utilization server ) t system = t server / (1 utilization server ) if server highly utilized, t system gets VERY HIGH lesson: keep utilization low (below 75%) rate arrival rate departure server rate server 7 8

Disk Usage Models data mining + supercomputing large files, sequential reads raw data transfer rate (rate transfer ) is most important transaction processing large files, but random access, many small requests IOPS is most important time sharing filesystems small files, sequential accesses, potential for file caching IOPS is most important must design disk (I/O) system based on target workload use disk benchmarks (they exist) Disk Alternatives solid state disk (SSD) DRAM + battery backup with standard disk interface + fast: no seek time, no rotation time, fast transfer rate expensive FLASH memory + fast: no seek time, no rotation time, fast transfer rate + non-volatile slow wears out over time optical disks (CDs) cheap if write-once, expensive if write-multiple slow 9 10 Extensions to Conventional Disks increasing density: more sensitive heads, finer control increases cost fixed head: head per track + seek time eliminated low track density parallel transfer: simultaneous read from multiple platters difficulty in looking onto different tracks on multiple surfaces lower cost alternatives possible (disk arrays) More Extensions to Conventional Disks disk caches: disk-controller RAM buffers data + fast writes: RAM acts as a write buffer + better utilization of host-to-device path high miss rate increases request latency disk scheduling: schedule requests to reduce latency e.g., schedule request with shortest seek time e.g., elevator algorithm for seeks (head sweeps back and forth) works best for unlikely cases (long queues) 11 12

Disk Arrays collection of individual disks (D = # disks) distribute data across disks access in parallel for higher b/w (IOPS) issue: data distribution => load balancing e.g., 3 disks, 3 files (A, B, C): each 2 sectors long (e.g., & ) undistributed B1 coarse-grain striping B1 fine-grain striping B1 B1 B1 Disk Arrays: Stripe Width fine-grain striping D * stripe width evenly divides smallest accessible data (sector) only one request served at a time (why?) + perfect load balance + effective transfer rate approx D times better than single disk access time can go up, unless disks synchronized (disk skew) coarse-grain striping data transfer parallelism for large requests concurrency for small requests (several small requests at once) statistical load balance must consider workload to determine stripe width 13 14 Disk Redundancy and RAIDs I/O System Architecture disk failures are a significant fraction of all hardware failures electrical failures are rare, but mechanical failures more common striping increases number of files touched by failure fix with replication and/or parity protection RAID: redundant array of inexpensive disks [Patterson+87] arrays of cheap disks provide high performance + reliability D = # data disks, C = # check disks CPU I/O $ memory bus adapter memory I/O bus DMAC buses memory bus I/O bus I/O processing program controlled DMA I/O processors (IOPs) 6 levels of RAID depend on redundancy/concurrency level 1: full mirroring (D := C) level 3: bit-interleaved parity (e.g., D=8, C=1) level 6: two-dimensional error bits (e.g., D=8, C=2) IOP I/O I/O 15 16

Bus Issues (Memory & I/O Buses) clocking: is bus clocked? synchronous: clocked, short bus fast asynchronous: no clock, use handshaking instead slow switching: when is control of bus acquired and released? atomic: bus held until request complete slow split-transaction (pipelined): bus free btwn request & reply fast arbitration: how do we decide who gets the bus next? overlap arbitration for next master with current transfer daisy chain: closer devices have priority slow distributed: wired-or, low-priority back-off medium some other issues split data/address lines, width, burst transfer memory buses I/O buses I/O and Memory Buses bits MHz peak MB/s special features Summit 128 60 960 Challenge 256 48 1200 XDBus 144 66 1056 ISA 16 8 16 original PC bus IDE 16 8 16 tape, CD-ROM PCI 32(64) 33(66) 133(266) plug+play SCSI/2 8/16 5/10 10/20 high-level interface PCMCIA 8/16 8 16 modem, hot-swap USB serial isoch. 1.5 power line, packetized FireWire serial isoch. 100 fast USB memory buses: speed (usually custom design) I/O buses: compatibility (usually industry standard) + cost 17 18 Who Does I/O? main CPU explicitly executes all I/O operations high overhead, potential cache pollution problem + no cache coherence problems I/O Processor (IOP or channel processor) (special or general) processor dedicated to I/O operations + fast may be overkill, cache coherence problems DMAC (direct memory access controller) can transfer data to/from memory given start address (but that s all) + fast, usually simple still may be coherence problems, must be on memory bus Communicating with DMAC/IOP not an issue if main CPU performs I/O by itself I/O control: how to initialize DMAC/IOP? memory mapped: ld/st to preset, VM-protected addresses privileged I/O instructions I/O completion: how does CPU know DMAC/IOP is finished? polling: periodically check status bit slow interrupt: I/O completion interrupts CPU fast Q: do DMAC/IOP use physical or virtual addresses? physical: simpler, but can only transfer 1 page at a time (why?) virtual: more powerful, but DMAC/IOP needs TLB 19 20

I/O System Example given 500 MIPS CPU 16B wide, 100 ns memory system 10000 instrs per I/O 16KB per I/O 200 MB/s I/O bus, with room for 20 SCSI-2 controllers SCSI-2 strings 20MB/s with 15 disks per bus SCSI-2 1ms overhead per I/O 7200 RPM (120 RPS), 8ms avg seek, 6MB/s transfer disks 200GB total storage Q: choose 2BG or 8GB disks for maximum IOPS? how to arrange disks and controllers? I/O System Example (cont d) step 1: calculate CPU, memory, I/O bus peak IOPS CPU: 500 MIPS/ (10000 instructions/io) = 50000 IOPS memory bus: (16-bytes / 100ns) / 16KB = 10000 IOPS I/O bus: (200MB/s) / 16KB = 12500 IOPS memory bus (10000 IOPS) is the bottleneck! step 2: calculate disk IOPS t disk = 8ms + 0.5 / 120 RPS + 16BK / (6MB/s) = 15ms disk: 1 / 15ms = 67 IOPS 8GB disks need 25 25 * 67 IOPS = 1675 IOPS 2GB disks need 100 100 * 67 IOPS = 6700 IOPS 100 2GB disks (6700 IOPS) disks are new bottleneck! answer.i: 100 2GB disks! 21 22 I/O System Example (cont d) step 3: calculate SCSI-2 controller peak IOPS t SCSI-2 = 1ms + 16KB / (20MB/s) = 1.8ms SCSI-2: 1 / 1.8ms = 556 IOPS step 4: how many disks per controller? 556 IOPS / 67 IOPS = 8 disks per controller step 5: how many controllers? 100 disks / 8 disks/controller = 13 controllers answer.ii: 13 controllers, 8-disks each New: Integrating I/O into Unified SAN I/O bottleneck is often the OS how can we keep the OS involvement to a minimum? user-level DMA (also called remote DMA or RDMA) VIA: Virtual Interface Architecture describes system area network (SAN) abstract model: processor has queues of requests/responses OS only involved to set up queues Infiniband another SAN specification for user-level RDMA like VIA, might be DOA QPIP (read the paper!) tries to solve VIA/Infiniband problems 23 24

Summary disks parameters performance (t queuing gets worse as utilization increases) RAID buses I/O vs. memory I/O system architecture CPU vs. DMAC vs. IOP current research: SANs with user-level DMA next up: multithreading and multiprocessing 25