DOC PREVIEW
Berkeley COMPSCI 252 - Lecture 13

This preview shows page 1-2-3-4-25-26-27-52-53-54-55 out of 55 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 55 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 55 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 55 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 55 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 55 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 55 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 55 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 55 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 55 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 55 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 55 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 55 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

DAP Spr.‘98 ©UCB 1Lecture 13: I/O: A Little Queuing Theory, RAIDProfessor David A. PattersonComputer Science 252Spring 1998DAP Spr.‘98 ©UCB 2Review: Disk Device TerminologyDisk Latency = Queuing Time + Seek Time + Rotation Time + Xfer TimeOrder of magnitude times for 4K byte transfers:Seek: 12 ms or lessRotate: 4.2 ms @ 7200 rpm (8.3 ms @ 3600 rpm )Xfer: 1 ms @ 7200 rpm (2 ms @ 3600 rpm)DAP Spr.‘98 ©UCB 3Review• Disk industry growing rapidly, improves: – bandwidth 40%/yr , – areal density 60%/year, $/MB faster?• queue + controller + seek + rotate + transfer• Advertised average seek time benchmark much greater than average seek time in practice• Response time vs. Bandwidth tradeoffs• Value of faster response time:– 0.7sec off response saves 4.9 sec and 2.0 sec (70%) total time per transaction => greater productivity– everyone gets more done with faster response, but novice with fast response = expert with slow• Processor Interface: today peripheral processors, DMA, I/O bus, interruptsDAP Spr.‘98 ©UCB 4Review: Storage System Issues• Historical Context of Storage I/O• Secondary and Tertiary Storage Devices• Storage I/O Performance Measures• Processor Interface Issues• A Little Queuing Theory• Redundant Arrarys of Inexpensive Disks (RAID)• I/O Buses• ABCs of UNIX File Systems• I/O Benchmarks• Comparing UNIX File System PerformanceDAP Spr.‘98 ©UCB 5Review: Disk I/O PerformanceResponse time = Queue + Device Service time100%ResponseTime (ms)Throughput (% total BW)01002003000%ProcQueueIOC DeviceMetrics: Response Time ThroughputDAP Spr.‘98 ©UCB 6Introduction to Queueing Theory• More interested in long term, steady state than in startup => Arrivals = Departures• Little’s Law: Mean number tasks in system = arrival rate x mean reponse time– Observed by many, Little was first to prove• Applies to any system in equilibrium, as long as nothing in black box is creating or destroying tasksArrivals DeparturesDAP Spr.‘98 ©UCB 7A Little Queuing Theory: Notation• Queuing models assume state of equilibrium: input rate = output rate• Notation: r average number of arriving customers/secondTseraverage time to service a customer (tradtionally µ = 1/ Tser )u server utilization (0..1): u = r x Tser (or u = r / Tser )Tqaverage time/customer in queue Tsysaverage time/customer in system: Tsys = Tq + TserLqaverage length of queue: Lq = r x Tq Lsysaverage length of system: Lsys = r x Tsys • Little’s Law: Lengthsystem = rate x Timesystem (Mean number customers = arrival rate x mean service time)ProcIOC DeviceQueueserverSystemDAP Spr.‘98 ©UCB 8A Little Queuing Theory• Service time completions vs. waiting time for a busy server: randomly arriving event joins a queue of arbitrary length when server is busy, otherwise serviced immediately– Unlimited length queues key simplification• A single server queue: combination of a servicing facility that accomodates 1 customer at a time (server) + waiting area (queue): together called a system• Server spends a variable amount of time with customers; how do you characterize variability?– Distribution of a random variable: histogram? curve?ProcIOC DeviceQueueserverSystemDAP Spr.‘98 ©UCB 9A Little Queuing Theory• Server spends a variable amount of time with customers– Weighted mean m1 = (f1 x T1 + f2 x T2 +...+ fn x Tn)/F (F=f1 + f2...)– variance = (f1 x T12 + f2 x T22 +...+ fn x Tn2)/F – m12» Must keep track of unit of measure (100 ms2 vs. 0.1 s2 )– Squared coefficient of variance: C = variance/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% < average• Hypoexponential distribution C < 1 : most close to average, C=0.5 => 90% < 2.0 x average, only 57% < average• Hyperexponential distribution C > 1 : further from average C=2.0 => 90% < 2.8 x average, 69% < averageProcIOC DeviceQueueserverSystemAvg.DAP Spr.‘98 ©UCB 10A Little Queuing Theory: Variable Service Time• Server spends a variable amount of time with customers– Weighted mean m1 = (f1xT1 + f2xT2 +...+ fnXTn)/F (F=f1+f2+...)– Squared coefficient of variance C• Disk response times C ≈ 1.5 (majority seeks < average)• Yet usually pick C = 1.0 for simplicity• Another useful value is average time must wait for server to complete task: m1(z)– 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 m1ProcIOC DeviceQueueserverSystemDAP Spr.‘98 ©UCB 11A Little Queuing Theory:Average Wait Time• Calculating average wait time in queue Tq– If something at server, it takes to complete on average m1(z)– Chance server is busy = u; average delay is u x m1(z)– All customers in line must complete; each avg Tser Tq = u x m1(z) + Lq x Ts er= 1/2 x u x Tser x (1 + C) + Lq x Ts er Tq = 1/2 x u x Ts er x (1 + C) + r x Tq x Ts er Tq = 1/2 x u x Ts er x (1 + C) + u x TqTq x (1 – u) = Ts er x u x (1 + C) /2Tq = Ts er x u x (1 + C) / (2 x (1 – u))• Notation: r average number of arriving customers/secondTseraverage time to service a customeru server utilization (0..1): u = r x TserTqaverage time/customer in queueLq average length of queue:Lq= r x TqDAP Spr.‘98 ©UCB 12A Little Queuing Theory: M/G/1 and M/M/1• 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 x (1 + C) /(2 x (1 – u)) = Tser x u / (1 – u) Tseraverage time to service a customeru server utilization (0..1): u = r x TserTqaverage time/customer in queueDAP Spr.‘98 ©UCB 13A Little Queuing Theory: An Example• processor sends 10 x 8KB disk I/Os per second, requests & service exponentially distrib., avg. disk service = 20 ms• 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: r average number of arriving


View Full Document

Berkeley COMPSCI 252 - Lecture 13

Documents in this Course
Quiz

Quiz

9 pages

Caches I

Caches I

46 pages

Lecture 6

Lecture 6

36 pages

Lecture 9

Lecture 9

52 pages

Figures

Figures

26 pages

Midterm

Midterm

15 pages

Midterm

Midterm

14 pages

Midterm I

Midterm I

15 pages

ECHO

ECHO

25 pages

Quiz  1

Quiz 1

12 pages

Load more
Download Lecture 13
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Lecture 13 and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Lecture 13 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?