CS152 Computer Architecture and Engineering Lecture 24 I/O and Storage SystemsRecap: Nano-layered Disk HeadsRecap: Disk Device TerminologyDisk I/O PerformanceIntroduction to Queueing TheoryA Little Queuing Theory: Use of random distributionsA Little Queuing Theory: Variable Service TimeA Little Queuing Theory: Average Wait TimeA Little Queuing Theory: M/G/1 and M/M/1A Little Queuing Theory: An ExampleMemory System I/O PerformanceAdministriviaGiving Commands to I/O DevicesMemory Mapped I/OI/O Device Notifying the OSExample: Device InterruptAlternative: PollingPolling is faster/slower than InterruptsDelegating I/O Responsibility from the CPU: DMADelegating I/O Responsibility from the CPU: IOPReliability and AvailabilityManufacturing Advantages of Disk ArraysArray ReliabilityRedundant Arrays of DisksRAID 1: Disk Mirroring/ShadowingRAID 5+: High I/O Rate ParityProblems of Disk Arrays: Small WritesSystem-Level AvailabilityOceanStore Vision: Utility-based InfrastructureWhat are the advantages of a utility?Two Types of OceanStore DataThe Path of an OceanStore UpdateArchival Dissemination of FragmentsSecure Object StorageThe Berkeley PetaByte Archival ServiceI/O Summary:CS152Computer Architecture and Engineering Lecture 24I/O and Storage SystemsApril 29, 2004John Kubiatowicz (www.cs.berkeley.edu/~kubitron)lecture slides: http://inst.eecs.berkeley.edu/~cs152/4/28/04 ©UCB Spring 2004CS152 / Kubiatowicz Lec24.2Recap: Nano-layered Disk Heads°Special sensitivity of Disk head comes from “Giant Magneto-Resistive effect” or (GMR) °IBM is leader in this technology•Same technology as TMJ-RAM breakthrough we described in earlier class. Coil for writing4/28/04 ©UCB Spring 2004CS152 / Kubiatowicz Lec24.3Disk Latency = Queueing Time + Controller time + Seek Time + Rotation Time + Xfer TimeOrder of magnitude times for 4K byte transfers:Average Seek: 8 ms or lessRotate: 4.2 ms @ 7200 rpmXfer: 1 ms @ 7200 rpmRecap: Disk Device Terminology4/28/04 ©UCB Spring 2004CS152 / Kubiatowicz Lec24.4Disk I/O PerformanceResponse time = Queue + Device Service time100%ResponseTime (ms)Throughput (Utilization)(% total BW)01002003000%ProcQueueIOC DeviceMetrics: Response Time Throughputlatency goes as Tser×u/(1-u) u = utilization4/28/04 ©UCB Spring 2004CS152 / Kubiatowicz Lec24.5°Queueing Theory applies to long term, steady state behavior Arrival rate = Departure rate°Little’s Law: Mean number tasks in system = arrival rate x mean reponse time•Observed by many, Little was first to prove•Simple interpretation: you should see the same number of tasks in queue when entering as when leaving.°Applies to any system in equilibrium, as long as nothing in black box is creating or destroying tasks“Black Box”QueueingSystemArrivals DeparturesIntroduction to Queueing Theory4/28/04 ©UCB Spring 2004CS152 / Kubiatowicz Lec24.6°Server spends a variable amount of time with customers•Weighted mean m1 = (f1 x T1 + f2 x T2 +...+ fn x Tn)/F = p(T)xT2 = (f1 x T12 + f2 x T22 +...+ fn x Tn2)/F – m12 = p(T)xT2 - m12•Squared coefficient of variance: C = 2/m12-Unitless measure (100 ms2 vs. 0.1 s2)°Exponential distribution C = 1 : most short relative to average, few others long; 90% < 2.3 x average, 63% < averageHypoexponential distribution C < 1 : most close to average, C=0.5 => 90% < 2.0 x average, only 57% < averageHyperexponential distribution C > 1 : further from average C=2.0 => 90% < 2.8 x average, 69% < averageAvg.A Little Queuing Theory: Use of random distributionsAvg.0Proc IOC DeviceQueueserverSystem4/28/04 ©UCB Spring 2004CS152 / Kubiatowicz Lec24.7°Disk response times C 1.5 (majority seeks < average)°Yet usually pick C = 1.0 for simplicity•Memoryless, exponential dist•Many complex systems well described by memoryless distribution!°Another useful value is average time must wait for server to complete current task: m1(z)•Called “Average Residual Wait Time”•Not just 1/2 x m1 because doesn’t capture variance•Can derive m1(z) = 1/2 x m1 x (1 + C)•No variance C= 0 => m1(z) = 1/2 x m1•Exponential C= 1 => m1(z) = m1A Little Queuing Theory: Variable Service TimeProc IOC DeviceQueueserverSystemAvg.0Time4/28/04 ©UCB Spring 2004CS152 / Kubiatowicz Lec24.8°Calculating average wait time in queue Tq:•All customers in line must complete; avg time: m1Tser= 1/•If something at server, it takes to complete on average m1(z)-Chance server is busy = u=/; average delay is u x m1(z)Tq = u x m1(z) + Lq x TserTq = u x m1(z) + x Tq x Tser Tq = u x m1(z) + u x TqTq x (1 – u) = m1(z) x uTq = m1(z) x u/(1-u) = Tser x {1/2 x (1+C)} x u/(1 – u))Notation: average number of arriving customers/secondTseraverage time to service a customeru server utilization (0..1): u = x TserTqaverage time/customer in queueLq average length of queue:Lq= x Tqm1(z) average residual wait time = Tser x {1/2 x (1+C)}A Little Queuing Theory: Average Wait TimeLittle’s LawDefn of utilization (u)4/28/04 ©UCB Spring 2004CS152 / Kubiatowicz Lec24.9°Assumptions so far:•System in equilibrium•Time between two successive arrivals in line are random•Server can start on next customer immediately after prior finishes•No limit to the queue: works First-In-First-Out•Afterward, all customers in line must complete; each avg Tser°Described “memoryless” or Markovian request arrival (M for C=1 exponentially random), General service distribution (no restrictions), 1 server: M/G/1 queue°When Service times have C = 1, M/M/1 queueTq = Tser x u / (1 – u) Tseraverage time to service a customeru server utilization (0..1): u = x TserTqaverage time/customer in queueA Little Queuing Theory: M/G/1 and M/M/14/28/04 ©UCB Spring 2004CS152 / Kubiatowicz Lec24.10°Processor sends 10 x 8KB disk I/Os per second, requests & service exponentially distrib., avg. disk service = 20 ms•This number comes from disk equation:Service time = Ave seek + ave rot delay + transfer time + ctrl overhead°On average, how utilized is the disk?•What is the number of requests in the queue?•What is the average time spent in the queue?•What is the average response time for a disk request?°Notation: average number of arriving customers/second = 10Tseraverage time to service a customer = 20 ms (0.02s)u server utilization (0..1): u = x Tser= 10/s x .02s = 0.2Tqaverage time/customer in queue = Tser x u / (1 – u) = 20 x 0.2/(1-0.2)
View Full Document