Upload
others
View
0
Download
0
Embed Size (px)
Citation preview
Introduction to Performance Engineering and Modeling
Dr. Michele Mazzucco Software Engineering Group
[email protected] http://math.ut.ee/~mazzucco
* Whetheryoudesign,build,test,maintain,ormanageapplications,youneedtomanageperformance* Performanceisamake‐or‐breakqualityforsoftware* Ifyoudon’tknowyourperformanceobjectives,youareunlikelytomeet
them* Performanceaffectsdifferentrolesindifferentways,e.g.* Asanarchitect:balanceperformanceandscalability* Asadeveloper:isthesystemoptimized“enough”?* Asatester:validatewhetherthesystemsupportstheexpectedworkload* Asasystemadministrator:isthesystemmeetingitsperformancegoals?
* Performanceengineeringincludesroles,skills,activities,practicesandtoolsaimingatensuringthatperformanceobjectivesaremet
WhatisPerformanceEngineering?
2
* Performancefailurescostthesoftwareindustrymillionsofdollarseveryyear.Theyinclude
1. Increasedoperationalcosts2. Increaseddevelopmentcosts3. Increasedhardwarecosts4. Canceledprojects5. Damagedcustomersrelationships6. Reducedcompetiveness,and
7. Lostincome
WhytoModelPerformance?(1)
3
* Performanceisaboutriskmanagement* Youhavetodecidehowimportantperformanceistothesuccessofyoursystemorapplication
* Waitingtimesincreaseasthesystemgetsmoreandmorecongested.* Needtounderstandhowcongestionaffectsperformance!* Differentframeworksexiststomodelperformance
* IwillfocusonQueuingTheory
WhytoModelPerformance?(2)
4
Aqueue
Alongqueue
Apriorityqueue
5
Aqueue
Alongqueue
Apriorityqueue
* Queuingtheoryprovidesprobabilisticanalysisofthesequeues,e.g.* Averagelength* Averagewaitingtime* Probabilitythatthequeueisatacertainlength* Probabilitythatajobwillhavetoqueue
6
Aqueue
Alongqueue
Apriorityqueue
* Queuingtheoryprovidesprobabilisticanalysisofthesequeues,e.g.* Averagelength* Averagewaitingtime* Probabilitythatthequeueisatacertainlength* Probabilitythatajobwillhavetoqueue
7
ExampleofPriorityQueueAnelectricalutilitycompanyusessixcustomerservicerepresentatives(CSRs)atitscallcentertohandletelephonecallsandinquiriesfromitstop350businesscustomers.Thenexttierof700businesscustomersisalsohandledbysixCSRs.Basedonthecustomer’scode,thecallcenterroutesbusinesscustomerstodifferentqueuesandCSRs.Amanagerattheutilityexplains:“Wedon’tignoreanyone,butourbiggestcustomerscertainlygetmoreattentionthantherest.”
ApplicationsofQueuingTheory
* Telecommunications(e.g.,publicswitchedtelephonenetwork)* Trafficcontrol,transport,logistics* Healthservices(e.g.,controlofhospitalbedassignments)* Airporttraffic,airlineticketsales* Customerservice,callcenters* Layoutofmanufacturingsystems* …and* Modelingcomputersystems’performance
8
ExampleApplicationofQueuingTheory–TrafficLights
* Howdowehavetoregulatetrafficlightssuchthatthewaitingtimesareacceptable?
9
ExampleApplicationofQueuingTheory‐TheFoodStore
* Howlongdocustomershavetowaitatthecheckouts?* Whathappenswiththewaitingtimeduringpeak‐hours?* Arethereenoughcheckouts?
10
ExampleApplicationofQueuingTheory–ThePostOffice
* Inapostofficetherearecountersspecializedine.g.stamps,packages,financialtransactions,etc.* Arethereenoughcounters?
Separatequeuesoronecommonqueueinfrontofcounterswiththesamespecialization?
11
ExampleApplicationofQueuingTheory–TheCallCenter
* Questionsbyphone,regardinginsuranceconditions,arehandledbyacallcenter.Thiscallcenterhasateamstructure,whereeachteamhelpscustomersfromaspecificregiononly.* Howlongdocustomershavetowaitbeforeanoperatorbecomes
available?* Isthenumberofincomingtelephonelinesenough?* Arethereenoughoperators?* Poolingteams?
12
* Capacityproblemsareverycommoninindustryandoneofthemaindriversofprocessredesign* Needtobalancethecostofincreasedcapacityagainstthegainsof
increasedproductivityandservice
* Queuingandwaitingtimeanalysisisparticularlyimportantinservicesystems* Largecostsofwaitingandoflostsalesduetowaiting
PrototypeExample–Hospital’sER* Patientsarrivebyambulanceorbytheirown* Onedoctorisalwaysonduty* Moreandmorepatientsseekhelp⇒longerwaitingtimes Question:Shallweaddanotherdoctor?
WhyisQueuingAnalysisimportant?
13
ACost/CapacityTradeoffModel
Process capacity
Cos
t
Cost of waiting
Cost of service
Total cost
14
ComponentsofaQueuingSystem(1)
CallingPopulation Queue Service
Mechanism
InputSource TheQueuingSystem
Jobs
ArrivalProcess
QueueConfiguration
QueueDiscipline
ServedJobs
ServiceProcess
leavethesystem
15
ComponentsofaQueuingSystem(2)
* Thecallingpopulation* Thepopulationfromwhichcustomers/jobsoriginate* Thesizecanbefiniteorinfinite(thelatterismostcommon)* Canbehomogeneous(i.e.,onlyonetypeofcustomers/jobs)or
heterogeneous(i.e.,severaldifferentkindsofcustomers/jobs)
* TheArrivalProcess* Determineshow,whenandwherecustomers(jobs)arrivetothesystem* Animportantcharacteristicisthedistributionoftheinter‐arrivalintervals* Denotebyλtherateatwhichjobsenterthesystem(e.g.,1job/6secs.)* 1/λistheaverageintervalbetweensuccessivejobarrivals(e.g.,6secs.)16
ComponentsofaQueuingSystem(3)
* Thequeueconfiguration* Specifiesthenumberofqueues* Singleormultiplelinestoanumberofservicestations
* Theireffectoncustomerbehavior* Balking,renegingandjockeying* Theirmaximumsize(#ofjobsthequeuecanhold)
17
ExampleofPossibleConfigurations
Servers
MultipleQueues
Servers
SingleQueue
18
ExampleofPossibleConfigurations
Servers
MultipleQueues
Servers
SingleQueue
1. Theprovidedservicecanbedifferentiated
2. Laborspecializationpossible3. Customershavemoreflexibility4. Balkingbehaviormaybe
deterred
1. Guaranteesfairness* FIFOappliedtoallarrivals
2. Nocustomeranxietyregardingchoiceofqueue
3. Themostefficientsetupforminimizingtimeinthequeue
4. Jockeying(lineswitching)isavoided
19
ComponentsofaQueuingSystem(4)
* TheServiceMechanism* Caninvolveoneormoreservers* Thesizeofthejobisitsservicerequirement* Theaverageservicerate(e.g.,1/jobsize)isdenotedasμ
* Thequeuediscipline* Specifiestheorderinwhichjobswillbeserved* MostcommonlyusedprincipleisFIFO* Otherrulesare,forexample,PS,LIFO,SJF,…* Canentailprioritizationbasedoncustomertype
20
KendalNotation
Sixparametersinshorthand* Firstthreetypicallyused,unlessspecified1. ArrivalDistribution* Probabilityofanewjobarrivesintimet
2. ServiceDistribution* Probabilitydistributionjobisservicedintimet
3. Numberofservers4. TotalCapacity(infiniteifnotspecified)5. PopulationSize(infinite)6. ServiceDiscipline(FCFS/FIFO)
21
KendalNotationExamples
* M/M/1* Exponentialarrivalsandservice,1server,infinitecapacityandpopulation,FCFS(FIFO)
* M/M/n* Sameasbefore,butnservers
* G/G/3/20/1500/SJF* Generalarrivalandservicedistributions,3servers,17queueslots(20‐3),1500totaljobs,ShortestJobFirst
22
Little’sLaw
* Theaveragenumberofcustomersinastablesystemisequaltotheaveragearrivalratemultipliedbytheaveragetimeacustomerspendsinthesystem,L=λW,where* L:averagenumberofjobsinthesystem* λ:arrivalrate* W:averageresponsetime(timeinthesystem)
* Examples:1. Onrainydays,streetsandhighwaysaremorecrowded2. Fastfoodrestaurantsneedasmallerdiningroomthanregular
restaurantswiththesamecustomerarrivalrate23
ExampleusingLittle’sLaw(1)
* Amusementpark* Peoplearrive,spendtimeatvarioussites,andleave
* Theypay$1perunittimeinthepark* Therateatwhichtheparkearnsis$Lperunittime* Therateatwhichpeoplepayis$λWperunittime* Overalonghorizon* Rateofparkearnings=Rateofpeople’spayment,or* L=λ W 24
ExampleusingLittle’slaw(2)
* Thereare120carsinfrontoftheLincolnTunnel
* 32cars/minutedepartoveraperiodwheretherearenocarsatthestartorendofthetunnel(e.g.securitychecks)
* Whatisaveragetimerequiredtogothroughthetunnel?
W=L/λ=120/32=3.75minutes
25
Load,StabilityandSteady‐State
* Aqueueingsystemisstableif arrival rate < system capacity
* Forasinglequeue,theratio arrival rate / system capacity iscalled“utilization”(or“load”),andisdenotedasρ(ρ=λ/μ)* Itdescribesthefractionoftimethefacilityisused* Asλincreases,thewaitingtimeincreases* Asμincreases,thewaitingtimedecreases* Ifthereis1server,werequireλ≤μ(weassumeλ<μ,i.e.ρ<1)* Whathappensifλ>μ?* Thesystemisunstable,andeitherthequeuesizegrowsunbound,or
jobsgetdropped!* Stablesystemswithtime‐stationaryarrivaltrafficapproacha
steady‐state(statisticalequilibrium)26
* ConsideranM/M/1queuewitharrivalrateλandservicerateμ* λ=expecteddemandperunittime* μ=expectedcapacityperunittime
* Similarly,iftherearenserversinparallel,i.e.,anM/M/nqueue,theexpectedcapacityisnμ
UtilizationFactor
! =Capacity Demand
Available Capacity=
"
n!µ27
* SteadyStatecondition* Enoughtimehaspassedforthesystemstatetobeindependent
oftheinitialstateaswellastheelapsedtime* Theprobabilitydistributionofthestateofthesystemremains
thesameovertime(i.e.,itisstationary)
* Transientcondition* Prevalentwhenaqueuingsystemhasrecentlybegunoperations* Thestateofthesystemisgreatlyaffectedbytheinitialstateand
bythetimeelapsedsinceoperationsstarted* Theprobabilitydistributionofthestateofthesystemchanges
withtime
SteadyState
QueuingTheoryanalyzessteadystatebehavior28
TransientVSSteadyState
29
DelayisCausedbyJobInterference
* Ifarrivalsareregularorsufficientlyspacedapart,noqueuingdelayoccurs
Deterministic traffic
Variable but spaced apart traffic
Time
Arrival Times
Departure Times
1 3 42
1 3 42
Time
Arrival Times
Departure Times
1 3 42
1 3 42
30
BurstinessCausesInterference
* Notethatdeparturesarelessburstythanarrivals
Time
Queuing Delays
Bursty Traffic
1 2 3 4
1 2 3 4
* Queuingresultsfromvariabilityinservicetimesand/orinterarrivalintervals
31
BurstinessExampleDifferentBurstinessLevelsatSameArrivalRate
Source: Fei Xue and S. J. Ben Yoo, UCDavis, “On the Generation and Shaping Self-similar Traffic in Optical Packet-switched Networks”, OPNETWORK 2002 32
JobSizeVariationCausesInterference
* Deterministicarrivals,variablejobsizes
Time
Queuing Delays
33
HighUtilizationExacerbatesInterference
* Thequeuingprobabilityincreasesastheloadincreases
Time
Queuing Delays
34
ThePoissonProcess
* ThestandardassumptioninmanyqueuingmodelsisthatthearrivalprocessisPoisson* PoissonProcess:thetimesbetweenarrivalsareindependent,identicallydistributedandexponential* P(arrival<t)=1–e‐λt* Keyproperty* Memoryless:thepaststatedoesnothelptopredictthefuture* Thefactthatacertaineventhasnothappenedyettellsusnothingabouthowmuchlongeritwilltakebeforeitdoeshappen* e.g.,P(X>40|X>=30)=P(X>10)35
Birth‐and‐DeathProcesses(1)
* Thefoundationofmanyofthemostcommonlyusedqueuingmodels
Birth–equivalenttothearrivalofacustomerorjob Death–equivalenttothedepartureofaservedcustomerorjob
Assumptions1. GivenN(t)=n,
Thetimeuntilthenextbirth(TB)isexponentiallydistributedwithparameterλn(customersarriveaccordingtoaPo‐process)
Theremainingservicetime(TD)isexponentiallydistributedwithparameterµn
2. TB&TDaremutuallyindependentstochasticvariablesandstatetransitionsoccurthroughexactly* oneBirth(n→n+1),or* oneDeath(n→n–1)
36
λ0 λ1 λn‐1 λn
0 1 2 n‐1 n n+1
µ1 µ2 µn µn+1
n =Staten,i.e.,thecaseofncustomers/jobsinthesystem
Birth‐and‐DeathProcesses(2)
* Ratediagram* ExcellenttoolfordescribingthemechanicsofaBirth‐
and‐Deathprocess
37
* Insteadystatethefollowingbalanceequationmustholdforeverystaten(provedviadifferentialequations)
* Also,theprobabilityofbeinginoneofthestatesmustequalto1(normalizingequation)
SteadyStateAnalysisofB‐DProcesses(1)
pi=1
i=0
!
"
RateIn=RateOut,i.e.,Averageentrancerate=Averagedeparturerate
38
SteadyStateAnalysisofB‐DProcesses(2)
State BalanceEquation
0
1
n
Normalization : pi = p0 1+!0
µ1
+!0!1
µ1µ2
+!0!1!2
µ1µ2µ3
+!!
"#
$
%&
i=0
'
( =1
C0 C239
TheM/M/1Queue(1)* SingleserverservingjobsinaFIFOmanner
* Mstandsfor“Markovian”* M/M/1standsforPoissonarrivalprocess* M/M/1standsforexponentiallydistributedservicetimes* Eachjobmustwaitforalljobsfoundinthesystemto
complete,beforebeingserved* DepartureTime=ArrivalTime+WorkloadFoundintheSystem+
Servicetime40
* Bysolvingthebalanceequationsweobtainthesteady‐stateprobabilityofthenumberofjobsinthesystem* pj=ρj(1‐ρ)
* Otherperformancemeasures* L=ρ/(1–ρ)* W=1/(μ‐λ)
41
TheM/M/1Queue(2)
0
10
20
30
40
50
60
70
80
90
100
0 0.2 0.4 0.6 0.8 1
Avg. no. of
jobs
in t
he
syst
em
Load, !
Number of jobs in the system
Example1:HowDelayScaleswithSystemcapacity
* Occupancyanddelayformulas ρ =λ/µ L=ρ/(1‐ρ) W=1/(µ‐λ)
* Supposethatweincreasebothλandµbyafactorofk* WhathappenstoL?AndtoW?1. λ=0.8andµ=1sec.=>ρ = 0.8* L=0.8/0.2=4,
* λ=1.6andµ=2=>ρ=0.8* L=0.8/0.2=4,
* Why?* Becausebyspeedinguparrivalsbyfactorofkandspeedingupservicetimesbyafactorofk,we’rebasicallyjustspeedingupour‘clockspeed’byafactorofk
42
W=1/0.2=5sec.
W=1/0.4=2.5sec.K=2
* Question* Whatisthemaximumallowableλ,giventhat1/μ=4minutes
andtheaveragewaitingtimemustbelessthan8minutes?
* W=servicetime+waitingtime<4+8=12minutes* W=1/(µ‐λ)=1/(μ‐λ)<12* (μ‐λ)>1/12* λ<μ–1/12=(3‐1)/12* λ<2/12=1/6jobs/minute
* Proof* W=1/(1/4‐1/6)=1/(0.25–0.16667)=12minutes,or* ρ=1/6×4=2/3≅0.67=>L=0.67/0.33≅2=>W=2×6=12min.
43
Example2–GuaranteeingQoSviaTrafficShaping
Multi‐ServersQueues
* Multiplejobsareservedsimultaneouslyonmultipleservers* Headofthelineservice:jobswaitinaFIFOqueue,
andwhenaserverbecomesfree,thefirstjobgoesintoservice
44
!
Queue
Service
"
"
"
...
* GeneralizationoftheM/M/1queue
* ThesolutionofthebalanceequationsandtheassociatedformulaeforcomputingtheperformancemeasuresaremorecomplicatedthanintheM/M/1case
45
TheM/M/nqueue
0
λ λ λ λ
µ 2µ (n‐1)µ nµ
1 nn‐22 n+1
λ
nµ
n‐1
(n‐2)µ
* PatientsarriveaccordingtoaPoissonprocesswithrateλ=2patientsperhour* Theservicetime(e.g.,thetimeittakesadoctortovisit/
treatapatient)isexponentiallydistributedwithmean1/μ=20minutes* TheERcanbemodeledasanM/M/nqueuewheren=no.
ofdoctors* Questions* Currentlyonly1doctorisonduty.Shallweaddanother
one?* Howisthesystem’sperformanceaffectedbyanincreasein
servicecapacity(e.g.,moredoctors)? 46
Example1
* Interpretation* Tobeinthequeue=tobeinthewaitingroom* Tobeinthesystem=tobeintheER(waitingorundertreatment)
47
Example1‐Summaryofresults
Characteristic One doctor (n=1) Two doctors (n=2) ρ 2/3 1/3 p0 1/3 1/2
(1-p0) 2/3 1/2 p1 2/9 1/3 Lq 4/3 patients 1/12 patients L 2 patients 3/4 patients w 2/3 h = 40 minutes 1/24 h = 2.5 minutes W 1 h 3/8 h = 22.5 minutes
48
* Thearrivalrateisλ* Thetotalservicerateis2μ=>stabilityconditionρ=λ/μ<2
* Whichconfigurationisbetter?* ThemetricofinterestifL(avg.no.ofjobs)
! 2"
!/2 "
!/2 "
!
"
"
(c) Two M/M/1 Queues(a) M/M/1 Queue (b) M/M/2 Queue
Example2(1)
a) M/M/1queuewithofferedload=ρ/2* La=ρ/(2‐ρ)
b) M/M/2queue* Lb=4ρ/[(2‐ρ)(2+ρ)]
c) 2independentM/M/1queues* Theofferedloadateachqueueisρ/2* Lc=2×[ρ/(2–ρ)]
* Whichconfigurationisbetter?
49
Example2(2)
a. M/M/1:La=ρ/(2‐ρ),b. M/M/2:Lb=4p/[(2‐ρ)(2+ρ)],orc. 2M/M/1:Lc=2×[ρ/(2–ρ)]?* Setρ=1,henceweobtain* 1<4/3<2,i.e.* La<Lb<Lc* Why?* Becausetheprocessingpowerofann‐seversystemisfullyutilizedONLYwhenallserversarebusy,whichrequiresatleastnjobsintheM/M/nqueue,andatleastnnon‐emptyqueuesinsystem(c)
50
Example2(3)
* AM/M/nsystemwithnoqueue* Ifallserversarebusy,jobsarelost!* Examples* Awaitingroomwithlimitedcapacity(e.g.,thehospital’s
ER)* Atelephonesystemwhichcanhandleatmostncalls
simultaneously
* TheM/M/n/nqueueisalwaysstable,nomatterwhattheofferedloadis!
51
TheM/M/n/nQueue(1)
* Thestatediagramhasexactlynstates
* Thegeneralexpressionsforthesteadystateprobabilities,waitingtimes,queuelengthsetc.areobtainedthroughthebalanceequationsasbefore(RateIn=RateOut;foreverystate)* ThekeyquestionforM/M/n/nqueuesis“whatisthe
blockingprobability?”,e.g.,whatisthefractionofjobsthatarelost?
52
TheM/M/n/nQueue(2)
0
λ λ λ
µ 2µ (n‐1)µ
1 n‐12 n
nµ
λ λ
3µ
* Istheblockingprobabilityaffectedbyn?
53
TheM/M/n/nQueue(3)
0
0.1
0.2
0.3
0.4
0.5
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
Blo
ckin
g p
rob
abil
ity
, p
n
Load, !
n=1
0
0.1
0.2
0.3
0.4
0.5
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
Blo
ckin
g p
rob
abil
ity
, p
n
Load, !
n=1n=10
* Istheblockingprobabilityaffectedbyn?
54
TheM/M/n/nQueue(3)
0
0.1
0.2
0.3
0.4
0.5
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
Blo
ckin
g p
rob
abil
ity
, p
n
Load, !
n=1n=10
n=100
* Istheblockingprobabilityaffectedbyn?
55
TheM/M/n/nQueue(3)
0
0.1
0.2
0.3
0.4
0.5
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
Blo
ckin
g p
rob
abil
ity
, p
n
Load, !
n=1n=10
n=100n=1,000
* Istheblockingprobabilityaffectedbyn?
56
TheM/M/n/nQueue(3)
0
0.1
0.2
0.3
0.4
0.5
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
Blo
ckin
g p
rob
abil
ity
, p
n
Load, !
n=1n=10
n=100n=1,000
n=10,000
* Istheblockingprobabilityaffectedbyn?
57
TheM/M/n/nQueue(3)
* Designofqueuingsystemsusuallyinvolvesomekindofcapacitydecision* Thenumberofservicestations* Thenumberofserversperstation* Theservicetimeforindividualservers⇒ Thecorrespondingdecisionvariablesareλ,nandµ
* Examples:* Thenumberofdoctorsinahospital,* Thenumberofexitsandcashiersinasupermarket,* Thechoiceofmachinetypeatanewinvestmentdecision,* Thelocalizationoftoiletsinanewbuilding,etc…
QueuingModelingandSystemDesign(1)
58
* Twofundamentalquestionswhendesigning(queuing)systems* Whichservicelevelshouldweaimfor?* Howmuchcapacityshouldweacquire?
* Thecostofincreasedcapacitymustbebalancedagainstthecostreductionduetoshorterwaitingtime⇒ Specifyawaitingcostorashortagecostaccruingwhen
customershavetowaitforserviceor…⇒ …Specifyanacceptableservicelevelandminimizethe
capacityunderthiscondition
* Theshortageorwaitingcostrateissituationdependentandoftendifficulttoquantify* Shouldreflectthemonetaryimpactadelayhasonthe
organizationwherethequeuingsystemresides
QueuingModelingandSystemDesign(2)
59
* Auniversityisabouttoleaseasupercomputer* Twoalternativesareavailable* TheMcomputerwhichismoreexpensivetoleasebutalsofaster* TheCcomputerwhichischeaperbutslower* Processingtimesandtimesbetweenjobarrivalsareexponential⇒M/M/1model* λ=20jobsperday* µM=30jobsperday,µC=25jobsperday* Theleasingandwaitingcosts:* Leasingprice:CM=$500perday,CC=$350perday* Thewaitingcostperjobandtimeunitjobisestimatedto$50perjob
andday * Question:* Whichcomputershouldtheuniversitychooseinordertominimize
theexpectedtotalcost?
ComputerProcurement(1)
60
* Settings* λ=20jobs/day* μM=30jobs/day,μC=25jobs/day* CM=500$/day,CC=350$/day,WC=50$/jobperday
* Results* ρ=λ/μ=>ρM=0.667,ρC=0.8* L=ρ/(1–ρ)=>LM=2,LC=4* WCM=100$/day,WCC=200$/day* Costoption1=600$/day,option2=550$/day
ComputerProcurement(2)
61
62
400
600
800
1000
1200
1400
1600
1800
0 5 10 15 20 25
Tot
al C
ost
($/d
ay)
! (jobs/day)
Holding cost = 40 $/day
LargeSmall
63
400
600
800
1000
1200
1400
1600
1800
0 5 10 15 20 25
Tot
al C
ost
($/d
ay)
! (jobs/day)
Holding cost = 50 $/day
LargeSmall
64
400
600
800
1000
1200
1400
1600
1800
0 5 10 15 20 25
Tot
al C
ost
($/d
ay)
! (jobs/day)
Holding cost = 60 $/day
LargeSmall
65
ResourceAllocationforPowerandPerformance
* Sservers
66
narerunning (S‐n)areswitchedoff
Userspayachargeproportionaltothejobsize(unknownapriori)
Eachuserpaysc$perunittimeperserver Runningserversconsumeelectricity,whichcostsr$/kWh Ifallserversarebusy,furtherjobsarelost Howtochoosethe“best”n?
* Supposewehaveacollectionofserversprovidingacertainnumberofservices
67
QoSProvisioningviaResourceAllocation+AdmissionControl
* Howdoweallocatetheavailableresourcesinthemostefficientway?* Shallweacceptthenext
incomingrequest?
1. Foreachacceptedandcompletedjoboftypei,ausershallpayachargeofci
2. TheresponsetimeWi(orwaitingtimewi)ofanacceptedjobshallnotexceedqi
3. Foreachjoboftypeiwhoseresponsetime(waitingtime)exceedsqi,theprovidershallpayapenaltyofri
1. “AnalyticalPerformanceModelingforComputerSystems”,http://www.morganclaypool.com/doi/abs/10.2200/S00282ED1V01Y201005CSL002
2. “CallCenterMathematics”,http://www.cs.vu.nl/~koole/ccmath/book.pdf
3. “IntroductiontoQueueingTheoryandStochasticTeletrafficModels”,http://www.ee.cityu.edu.hk/~zukerman/classnotes.pdf
4. “IntroductiontoQueueingTheoryandMathematicalModelling”,http://www.cs.auckland.ac.nz/courses/compsci742s2c/lectures/handout‐n‐q.pdf
68
References(1)
5. “M/M/n/KQueueingSystem”,http://ingforum.haninge.kth.se/armin/ALLA_KURSER/KOTEORI/EXER/repet5.pdf
6. “QueueingTheory”,http://www.win.tue.nl/~iadan/queueing.pdf
7. “TeletrafficEngineeringandNetworkPlanning”,http://oldwww.com.dtu.dk/teletraffic/handbook/telenook.pdf
8. “GrinsteadandSnell’sIntroductiontoProbability”,http://www.math.dartmouth.edu/~prob/prob/prob.pdf
69
References(2)
* PDQ:PrettyDamnQuick,http://www.perfdynamics.com/Tools/PDQ.html* TheRProjectforStatisticalComputing,
http://www.r‐project.org/* qnetworks–aQueueingNetworksanalysispackagefor
GNUOctave,http://www.moreno.marzolla.name/software/qnetworks/* Queueingsimulation,
http://www.stat.auckland.ac.nz/~stats255/qsim/qsim.html* JavaModellingTools,http://jmt.sourceforge.net/* Amorecompletelistoftheavailabletoolscanbefoundat
http://web2.uwindsor.ca/math/hlynka/qsoft.html
70
FreeTools
[email protected] http://math.ut.ee/~mazzucco
71