Upload
solomon-johns
View
219
Download
3
Embed Size (px)
Citation preview
© 1995 Daniel A. Menascé
Capacity Planning in Capacity Planning in Client/Server EnvironmentsClient/Server Environments
Daniel A. MenascéDaniel A. Menascé
George Mason UniversityGeorge Mason University
Fairfax, VA 22030Fairfax, VA 22030
USAUSA
[email protected]@cs.gmu.edu
© 1995 Daniel A. Menascé
OutlineOutline
Part I: Client/Server SystemsPart I: Client/Server Systems Part II: Introduction to Capacity Part II: Introduction to Capacity
PlanningPlanning Part III: A Capacity Planning Part III: A Capacity Planning
Methodology for C/S EnvironmentsMethodology for C/S Environments Part IV: Performance Prediction Part IV: Performance Prediction
Models for C/S EnvironmentsModels for C/S Environments
© 1995 Daniel A. Menascé
Outline (continued)Outline (continued)
Part V: Advanced Predictive Models of Part V: Advanced Predictive Models of C/S SystemsC/S Systems
Part VI: Case StudyPart VI: Case Study BibliographyBibliography
© 1995 Daniel A. Menascé
Part I:Part I:Client/Server (C/S) SystemsClient/Server (C/S) Systems
© 1995 Daniel A. Menascé
Definitions and Basic ConceptsDefinitions and Basic Concepts
ClientClient ServerServer Work division between client and Work division between client and
serverserver Client/Server communicationClient/Server communication
© 1995 Daniel A. Menascé
DB server
DB server
R
R
. . .
. . .router
router
FDDI ring
LAN segment 1
LAN segment 2
Definitions and basic conceptsDefinitions and basic concepts
© 1995 Daniel A. Menascé
Definitions and basic concepts:Definitions and basic concepts:ClientClient
Workstation with graphics and Workstation with graphics and processing capabilities.processing capabilities.
Graphical User Interface (GUI) Graphical User Interface (GUI) implemented at the client.implemented at the client.
Partial processing executed at the Partial processing executed at the client.client.
© 1995 Daniel A. Menascé
Definitions and basic concepts:Definitions and basic concepts:ServerServer
Machine with much larger processing Machine with much larger processing and I/O capacity than the client.and I/O capacity than the client.
Serves the various requests from the Serves the various requests from the clients.clients.
Executes a significant portion of the Executes a significant portion of the processing and I/O of the requests processing and I/O of the requests generated at the client.generated at the client.
© 1995 Daniel A. Menascé
Work division between client and Work division between client and serverserver
GUI
COMM. COMM.
I/OPre & Post
Process.
Processing
DB
Client Server
communications network
© 1995 Daniel A. Menascé
Interaction between client and serverInteraction between client and serverRemote Procedure Call (RPC)Remote Procedure Call (RPC)
client DB server
pre-proces-sing
post-proces-sing
serverprocessing
execute_SQL(par1,par2,...)
result_SQL(...)
© 1995 Daniel A. Menascé
Part II:Part II:Introduction to Capacity PlanningIntroduction to Capacity Planning
© 1995 Daniel A. Menascé
Migration to C/S example:Migration to C/S example:“downsizing” a claim processing application“downsizing” a claim processing application
DB server connected to several PCs DB server connected to several PCs through an Ethernet LANthrough an Ethernet LAN
GUI application executing at the PCsGUI application executing at the PCs LAN connected to the enterprise LAN connected to the enterprise
mainframe through a T1 linemainframe through a T1 line DB server is updated every night.DB server is updated every night.
© 1995 Daniel A. Menascé
Migration to C/S systems Migration to C/S systems mainframe based systemmainframe based system
mainframe
T1 line
© 1995 Daniel A. Menascé
Migration to C/S Migration to C/S DB server based systemDB server based system
mainframe
T1 line
DB server
LANgateway
© 1995 Daniel A. Menascé
Migration to C/S:Migration to C/S:some important questionssome important questions
How many clients can be supported by How many clients can be supported by the DB server while maintaining a the DB server while maintaining a response time below 2.5 sec? response time below 2.5 sec?
How long does it take to update the DB How long does it take to update the DB every night? every night?
© 1995 Daniel A. Menascé
Migration to C/S example: Migration to C/S example: measurements with a prototypemeasurements with a prototype
During 30 minutes (1,800 sec):During 30 minutes (1,800 sec):– 25% CPU utilization25% CPU utilization– 30% disk utilization30% disk utilization– 800 transactions were executed800 transactions were executed
Each transaction used:Each transaction used:
1,800 * 0.25 / 800 = 0.56 sec of CPU and1,800 * 0.25 / 800 = 0.56 sec of CPU and
1,800 * 0.30 / 800 = 0.68 sec of disk.1,800 * 0.30 / 800 = 0.68 sec of disk.
© 1995 Daniel A. Menascé
Good News and Bad NewsGood News and Bad News
Good News: we know the CPU and I/O Good News: we know the CPU and I/O service time of each transaction. service time of each transaction.
Bad News: transactions at the DB server Bad News: transactions at the DB server compete for CPU and I/O compete for CPU and I/O queues queues will will form at each device. We don’t know how form at each device. We don’t know how long each transaction long each transaction waits waits in the queue in the queue for the CPU and for the disk. for the CPU and for the disk.
© 1995 Daniel A. Menascé
DB Server ModelDB Server Model
arrivingtransactions
cpu
disk
DB server
departingtransactions
© 1995 Daniel A. Menascé
CPU or I/O TimesCPU or I/O Times
service demand = 0.56 seg
queue waitingtime
?
© 1995 Daniel A. Menascé
Capacity Planning DefinitionCapacity Planning Definition
Capacity Planning is the process of Capacity Planning is the process of predictingpredicting when the service levels will when the service levels will be violated as a function of the be violated as a function of the workload workload evolutionevolution, as well as the determination of , as well as the determination of the most cost-effective way of delaying the most cost-effective way of delaying system saturation. system saturation.
© 1995 Daniel A. Menascé
C/S Migration Example:C/S Migration Example:desired resultsdesired results
0
1
2
3
4
5
6
7
8
9
50 60 70 80 100
no. of client workstations
responsetime(sec)
servicelevel
© 1995 Daniel A. Menascé
Part III:Part III:A Capacity Planning Methodology A Capacity Planning Methodology
for Client/Server Environmentsfor Client/Server Environments
© 1995 Daniel A. Menascé
ConfigurationPlan
InvestmentPlan
PersonnelPlan
Understanding the Environment
Workload Characterization
WorkloadModel
Validation and Calibration
Workload Forecasting
Performance PredictionCost PredictionValidModel
Cost Model
Developing a Cost Model
PerformanceModel
Cost/Performance Analysis
Capacity Planning Methodology for Client Server Environments
© 1995 Daniel A. Menascé
ConfigurationPlan
InvestmentPlan
PersonnelPlan
Understanding the Environment
Workload Characterization
WorkloadModel
Validation and Calibration
Workload Forecasting
Performance PredictionCost PredictionValidModel
Cost Model
Developing a Cost Model
PerformanceModel
Cost/Performance Analysis
Capacity Planning Methodology for Client Server Environments
© 1995 Daniel A. Menascé
Understanding the EnvironmentUnderstanding the Environment
Hardware and System SoftwareHardware and System Software Network Connectivity MapNetwork Connectivity Map Network ProtocolsNetwork Protocols Server ConfigurationsServer Configurations Types of Applications Types of Applications Service Level AgreementsService Level Agreements Support and Management StructureSupport and Management Structure Procurement Procedures Procurement Procedures
© 1995 Daniel A. Menascé
Example of Understanding the Example of Understanding the EnvironmentEnvironment
5,000 PCs (386 e 486) running DOS and Windows 5,000 PCs (386 e 486) running DOS and Windows 3.1 and 800 UNIX workstations.3.1 and 800 UNIX workstations.
IBM MVS mainframe.IBM MVS mainframe. 80 LANs in 20 buildings connected by an FDDI 80 LANs in 20 buildings connected by an FDDI
100 Mbps backbone. 100 Mbps backbone. 50 Cisco routers.50 Cisco routers. Network technologies: FDDI, Ethernet, T1 links Network technologies: FDDI, Ethernet, T1 links
and Internet.and Internet.
© 1995 Daniel A. Menascé
Example of Understanding the Example of Understanding the Environment (continued)Environment (continued)
Protocols being routed: TCP/IP and Novell IPX.Protocols being routed: TCP/IP and Novell IPX. Servers: 80% are 486 and Pentiums and 20% are Servers: 80% are 486 and Pentiums and 20% are
RISC workstations running UNIX.RISC workstations running UNIX. Applications: office automation (e-mail, Applications: office automation (e-mail,
spreadsheets, wordprocessing), access to DBs (SQL spreadsheets, wordprocessing), access to DBs (SQL servers) and resource sharing. servers) and resource sharing.
Future applications: teleconferencing, EDI, image Future applications: teleconferencing, EDI, image processing. processing.
© 1995 Daniel A. Menascé
ConfigurationPlan
InvestmentPlan
PersonnelPlan
Understanding the Environment
Workload Characterization
WorkloadModel
Validation and Calibration
Workload Forecasting
Performance PredictionCost PredictionValidModel
Cost Model
Developing a Cost Model
PerformanceModel
Cost/Performance Analysis
Capacity Planning Methodology for Client Server Environments
© 1995 Daniel A. Menascé
Workload CharacterizationWorkload Characterization
Process of partitioning the global workload into Process of partitioning the global workload into subsets called subsets called workload componentsworkload components. Examples of . Examples of workload components:workload components:– DB transactions,DB transactions,– requests to a file server or,requests to a file server or,– jobs with similar characteristics.jobs with similar characteristics.
Workload components are composed of Workload components are composed of basic basic componentscomponents..
© 1995 Daniel A. Menascé
Workload Characterization: workload Workload Characterization: workload components and basic componentscomponents and basic components
Workload Component Basic Component
e-mail - send message- receive message
Access to a DB server - query- update
Acesso to mainframe - session establishment- execution of remote function.- session termination
© 1995 Daniel A. Menascé
Workload CharacterizationWorkload Characterization Basic Component ParametersBasic Component Parameters
Workload Intensity ParametersWorkload Intensity Parameters– number of messages sent/hournumber of messages sent/hour– number of query transactions/secnumber of query transactions/sec
Service Demand ParametersService Demand Parameters– average message lengthaverage message length– average I/O time per query transaction. average I/O time per query transaction.
© 1995 Daniel A. Menascé
Workload Characterization Workload Characterization MethodologyMethodology
Identification of Workload ComponentsIdentification of Workload Components Identification of Basic Components.Identification of Basic Components. Parameter Selection.Parameter Selection. Data Collection: benchmarks and ROTSData Collection: benchmarks and ROTS
(Rules of Thumb) may be used.(Rules of Thumb) may be used. Workload partitioning: averaging and Workload partitioning: averaging and
clustering.clustering.
© 1995 Daniel A. Menascé
Workload CharacterizationWorkload Characterization
Data Collection Alternatives Data Collection Alternatives
None Some Detailed
- use measurements only
- use measurements, “benchmarks” and ROTs
- use “benchmarks” and ROTs only
Data Collection Facilities
© 1995 Daniel A. Menascé
BenchmarksBenchmarks
National Software Testing Laboratories National Software Testing Laboratories (NSTL): servers and applications.(NSTL): servers and applications.
Transaction Processing Council (TPC)Transaction Processing Council (TPC) System Performance Evaluation System Performance Evaluation
Cooperative (SPEC)Cooperative (SPEC) AIM Benchmark suitesAIM Benchmark suites
© 1995 Daniel A. Menascé
ConfigurationPlan
InvestmentPlan
PersonnelPlan
Understanding the Environment
Workload Characterization
WorkloadModel
Validation and Calibration
Workload Forecasting
Performance PredictionCost PredictionValidModel
Cost Model
Developing a Cost Model
PerformanceModel
Cost/Performance Analysis
Capacity Planning Methodology for Client Server Environments
© 1995 Daniel A. Menascé
Workload Model ValidationWorkload Model Validation
SyntheticWorkload
ActualWorkload
System System
measuredresponsetimes
measuredresponsetimes
acceptable?NO
YES
Model Calibration
Model Validation
Valid Workload Model
© 1995 Daniel A. Menascé
ConfigurationPlan
InvestmentPlan
PersonnelPlan
Understanding the Environment
Workload Characterization
WorkloadModel
Validation and Calibration
Workload Forecasting
Performance PredictionCost PredictionValidModel
Cost Model
Developing a Cost Model
PerformanceModel
Cost/Performance Analysis
Capacity Planning Methodology for Client Server Environments
© 1995 Daniel A. Menascé
Workload ForecastingWorkload Forecasting
Process of predicting the workload intensity.Process of predicting the workload intensity.
0
5
10
15
20
25
30
35
40
45
Q1 Q2 Q3 Q4
Queries
Updates
tps
© 1995 Daniel A. Menascé
Workload ForecastingWorkload Forecasting Forecasting Business Units Forecasting Business Units
Number of business elements that Number of business elements that determine the workload evolutiondetermine the workload evolution
– number of invoicesnumber of invoices
– number of accountsnumber of accounts
– number of employeesnumber of employees
– number of claimsnumber of claims
– number of bedsnumber of beds
© 1995 Daniel A. Menascé
Workload Forecasting Workload Forecasting MethodologyMethodology
Application SelectionApplication Selection Identification of Forecasting Business Identification of Forecasting Business
Units (FBUs)Units (FBUs) Statistics gathering on FBUsStatistics gathering on FBUs FBU forecasting (use linear regression, FBU forecasting (use linear regression,
moving averages, exponential moving averages, exponential smoothing) and business strategic plans. smoothing) and business strategic plans.
© 1995 Daniel A. Menascé
Linear Regression ExampleLinear Regression Example
y = 101.7x + 1072.3
R2 = 0.9672
0
200
400
600
800
1000
1200
1400
1600
1800
2000
1 2 3 4 5 6 7
Series1
Linear(Series1)
month no. invoices1 1200.02 1230.03 1400.04 1467.05 1590.06 1682.57 1784.2
© 1995 Daniel A. Menascé
ConfigurationPlan
InvestmentPlan
PersonnelPlan
Understanding the Environment
Workload Characterization
WorkloadModel
Validation and Calibration
Workload Forecasting
Performance PredictionCost PredictionValidModel
Cost Model
Developing a Cost Model
PerformanceModel
Cost/Performance Analysis
Capacity Planning Methodology for Client Server Environments
© 1995 Daniel A. Menascé
Performance PredictionPerformance Prediction
Predictive models: analytic or simulation based.Predictive models: analytic or simulation based. Analytic models are based on Queuing Networks Analytic models are based on Queuing Networks
(QNs)(QNs)– efficientefficient– allow for the fast analysis of a large number of allow for the fast analysis of a large number of
scenariosscenarios– ideal for capacity planningideal for capacity planning
© 1995 Daniel A. Menascé
Performance PredictionPerformance Predictionfactors that impact performancefactors that impact performance
Client stationsClient stations ServersServers Communication mediaCommunication media ProtocolsProtocols Interconnection devices (bridges, Interconnection devices (bridges,
routers and gateways)routers and gateways)
© 1995 Daniel A. Menascé
Performance PredictionPerformance Prediction
Model Accuracy Model Accuracy
-
HighLow
• coarse grain model• little effort required for data collection
Model Accuracy
• fine grain model• detailed data collection for parameterization
© 1995 Daniel A. Menascé
Performance PredictionPerformance Prediction
An ExampleAn Example
R
R
. . .
. . .router
router
FDDI ring
LAN Segment 1
LAN segment 2
© 1995 Daniel A. Menascé
Performance PredictionPerformance Prediction QN for Example QN for Example
DB server 1
DB server 2
E1
E2
B1
B2
F
D1
D2
C1
C2
R1
R2
inter-connectionbetweensegments
© 1995 Daniel A. Menascé
Performance PredictionPerformance Prediction Response Times for the Example Response Times for the Example
50 60 800
0.5
1
1.5
2
2.5
3
3.5
4
50 60 80
Res
po
nse
Tim
e(s
ec)
Number of clients
© 1995 Daniel A. Menascé
ConfigurationPlan
InvestmentPlan
PersonnelPlan
Understanding the Environment
Workload Characterization
WorkloadModel
Validation and Calibration
Workload Forecasting
Performance PredictionCost PredictionValidModel
Cost Model
Developing a Cost Model
PerformanceModel
Cost/Performance Analysis
Capacity Planning Methodology for Client Server Environments
© 1995 Daniel A. Menascé
Performance Model ValidationPerformance Model Validation
PerformanceModel
ActualSystem
Measurements Computations
measuredresponse times
computedresponsetimes
acceptable?NO
YES
ModelCalibration
Model Validation
Valid Performance Model
© 1995 Daniel A. Menascé
ConfigurationPlan
InvestmentPlan
PersonnelPlan
Understanding the Environment
Workload Characterization
WorkloadModel
Validation and Calibration
Workload Forecasting
Performance PredictionCost PredictionValidModel
Cost Model
Developing a Cost Model
PerformanceModel
Cost/Performance Analysis
Capacity Planning Methodology for Client Server Environments
© 1995 Daniel A. Menascé
A Cost Model for C/S A Cost Model for C/S EnvironmentsEnvironments
Less than 5% of US companies quantify or Less than 5% of US companies quantify or control PC and LAN costs. control PC and LAN costs.
Some hidden costs in C/S environments:Some hidden costs in C/S environments:– hardware maintenance and supporthardware maintenance and support– software maintenance and upgradessoftware maintenance and upgrades– software distribution costssoftware distribution costs– personnel costs (approx.. 60% of total cost)personnel costs (approx.. 60% of total cost)
© 1995 Daniel A. Menascé
Some Cost ROTsSome Cost ROTs Software and hardware upgrades cost 10% of Software and hardware upgrades cost 10% of
purchase price per year. purchase price per year. A LAN administrator costs between US$500 A LAN administrator costs between US$500
and US$700 per client WS/month.and US$700 per client WS/month. Training costs vary between US$1,500 and Training costs vary between US$1,500 and
US$3,000 per technical staff person/year.US$3,000 per technical staff person/year. 40% of personnel costs are in resource 40% of personnel costs are in resource
management, 40% in application development, management, 40% in application development, and 20% in other categories.and 20% in other categories.
© 1995 Daniel A. Menascé
Part IV:Part IV:Performance Prediction Models for Performance Prediction Models for
C/S EnvironmentsC/S Environments
© 1995 Daniel A. Menascé
Queues and Queuing NetworksQueues and Queuing Networks
cpu
disk
completing transactions
LANClient
DB servercompleting transactions
© 1995 Daniel A. Menascé
Operational Analysis:Operational Analysis:Quick ReviewQuick Review
Little’s LawLittle’s Law Utilization LawUtilization Law Forced Flow LawForced Flow Law Service Demand LawService Demand Law Response Time LawResponse Time Law
© 1995 Daniel A. Menascé
Single QueueSingle Queue
W S
R
tps X tps
average transaction arrival rateX = average throughput
© 1995 Daniel A. Menascé
Single QueueSingle Queue
W S
R
tps X tps
W average waiting timeS = average service timeR = average response time
© 1995 Daniel A. Menascé
Single QueueSingle Queue
W S
R
tps X tps
R = W + S
© 1995 Daniel A. Menascé
Little’s LawLittle’s Law
PUB
avg. numberpeople in thepub
= avg. arrivalrate at thepub
Xavg. timespent at thepub
© 1995 Daniel A. Menascé
Little’s LawLittle’s LawExampleExample
A DB server executes 10 transactions per second. On the average, 20 transactions are being executed simultaneously. What is the average transaction response time?
© 1995 Daniel A. Menascé
Little’s LawLittle’s LawExampleExample
X = 10 tpsN = 20
Little’s Law: N = R
R = N / = 20 /10 = 2 sec
© 1995 Daniel A. Menascé
Little’s Law applied to single Little’s Law applied to single queuesqueues
tps X tps
N
N = R EquilibriumX
R
© 1995 Daniel A. Menascé
Utilization LawUtilization Lawno. transactions/measurement interval =
tps X tps
S
U
busy time /measurement interval=
busy time /no. transactions =
B/T C/T
B/C
© 1995 Daniel A. Menascé
Utilization LawUtilization Law
X = C / T
tps X tps
S
U
U = B / T
S = B / C
© 1995 Daniel A. Menascé
Utilization LawUtilization Law
X = C / T
tps X tpsS
U
U = B / T
S = B / C
U = B / T = (B/C) / (T/C) = S * X
© 1995 Daniel A. Menascé
Utilization LawUtilization Law
tps X tps
S
U
U = S * X
© 1995 Daniel A. Menascé
Utilization LawUtilization LawExampleExample
Each access to the DB server’s disk takes 25 msec on the average. During a one hour interval, 108,000 I/O’s to the disk were executed. What is the disk utilization?
© 1995 Daniel A. Menascé
Utilization LawUtilization LawExampleExample
S = 0.025 sec
X = 108,000 / 3,600 = 30 accesses/sec
Utilization Law: U = S * X
U = 0.025 * 30 = 0.75 = 75 %
© 1995 Daniel A. Menascé
Forced Flow LawForced Flow Law
i Xi
Xo
Xi = Vi * Xo
Vi = avg. no. visits to device i per transaction
© 1995 Daniel A. Menascé
Forced Flow LawForced Flow LawExampleExample
Each transaction executed on the DB server performs 3 disk accesses on the average. The disk utilization measured during a one hour interval was 50%. During the same interval, 7,200 transactions were executed. What is the average service time at the disk?
© 1995 Daniel A. Menascé
Forced Flow LawForced Flow LawExampleExample
Given:Vi = 3 disk accesses per transaction Ui = 30% = 0.3Xo = 7,200 / 3,600 = 2 tps
Utilization Law: Ui = Si * Xi Si = Ui / XiForced Flow Law: Xi = Vi * Xo Xi = 3 * 2 = 6 tps
Si = Ui / Xi = 0.3 / 6 = 50 msec
© 1995 Daniel A. Menascé
Service Demand LawService Demand Law
U
S1S2S3S4
service demand (D)
D = Si = V * Si
© 1995 Daniel A. Menascé
Service Demand LawService Demand Law
X o= C / T tpsU
S1S2S3S4
service demand (D)
D = (U * T) / C = U / (C / T) = U / X
© 1995 Daniel A. Menascé
Service Demand LawService Demand Law
Xo= C / T tpsU
S1S2S3S4
service demand (D)
D = V * S = U / Xo
© 1995 Daniel A. Menascé
Response Time LawResponse Time Law
Ro = Vi * Ri
Vi = avg. no. visits to device i per transaction
Ro
i
Ri
i
© 1995 Daniel A. Menascé
Operational Analysis: summaryOperational Analysis: summary
Little’s Law: N = Little’s Law: N = RR Utilization Law: U = S * XUtilization Law: U = S * X Forced Flow Law: Xi = Vi * XoForced Flow Law: Xi = Vi * Xo Service Demand Law: D = U / XoService Demand Law: D = U / Xo Response Time Law: Ro = Response Time Law: Ro = Vi*Ri Vi*Ri
i
© 1995 Daniel A. Menascé
Queuing NetworksQueuing Networks
i
RiXo
Ro
Given: service demands and no. of customersFind: average response time (Ro), throughput (Xo), average queue length per device.
© 1995 Daniel A. Menascé
Queuing NetworksQueuing NetworksTypes of DevicesTypes of Devices
queuing device: load independentSi(n) = Si for all n
queuing device: load dependent Si(n) = f(n)
delay device RT(i,n) = Di
© 1995 Daniel A. Menascé
Queuing Network SolutionQueuing Network Solution
Basic Technique Basic Technique : : Mean Value Analysis Mean Value Analysis (MVA)(MVA)
FeatureFeature: : simple, iterative and efficient. simple, iterative and efficient.
© 1995 Daniel A. Menascé
Mean Value AnalysisMean Value AnalysisResidence Time EquationResidence Time Equation
Residence Time (RT) at device iResidence Time (RT) at device i
RT (i,n) = Di + Di*NQ (i,n-1))RT (i,n) = Di + Di*NQ (i,n-1))
my totalservice time
total waiting time =total service time of all customers I find ahead of me
© 1995 Daniel A. Menascé
Mean Value Analysis Mean Value Analysis Residence Time EquationResidence Time Equation
Residence Time (RT) at device iResidence Time (RT) at device i
RT (i,n) = Di * (1 + NQ (i,n-1))RT (i,n) = Di * (1 + NQ (i,n-1))
where NQ (i,n) is the average number of where NQ (i,n) is the average number of transactions at device transactions at device i i when there are when there are nn transactions in the system.transactions in the system.
© 1995 Daniel A. Menascé
Mean Value Analysis Mean Value Analysis Throughput EquationThroughput Equation
iRi
Ro
Xo
n trans.
Little’s Law: n = Xo * Ro = Xo * RT(i,n)i
© 1995 Daniel A. Menascé
Mean Value Analysis Mean Value Analysis Throughput EquationThroughput Equation
Throughput Xo (n)Throughput Xo (n)
Xo (n) = n / Xo (n) = n / RT (i,n)RT (i,n)
where where nn is the number of transactions in the is the number of transactions in the system. system.
i
© 1995 Daniel A. Menascé
Mean Value Analysis Mean Value Analysis Queue Length EquationQueue Length Equation
i. . . . . .
X (i, n)
R (i, n)
NQ (i,n)
Little’s Law NQ (i, n) = R (i, n) * X (i, n)
© 1995 Daniel A. Menascé
Mean Value Analysis Mean Value Analysis Queue Length EquationQueue Length Equation
Little’s Law NQ (i, n) = R (i, n) * X (i, n)
Forced Flow Law X (i, n) = Vi * Xo (n)
NQ (i, n) = R (i, n) * Vi * Xo (n) =RT (i, n) * Xo (n)
© 1995 Daniel A. Menascé
Mean Value AnalysisMean Value AnalysisQueue Length EquationQueue Length Equation
NQ (i, n) = RT (i, n) * Xo (n)
Average Queue Length NQ (i, n)Average Queue Length NQ (i, n)
© 1995 Daniel A. Menascé
Mean Value Analysis Mean Value Analysis Combining the 3 equationsCombining the 3 equations
NQ (i, n) = RT (i, n) * Xo (n)NQ (i, n) = RT (i, n) * Xo (n)
Xo (n) = n / Xo (n) = n / RT (i,n)RT (i,n)
Di * (1 + NQ (i,n-1))Di * (1 + NQ (i,n-1))
where NQ (i, 0) = 0 for all device i.
DiDiRT (i,n) =RT (i,n) = if device i is a delay device
© 1995 Daniel A. Menascé
Mean Value Analysis Mean Value Analysis Combining the 3 equationsCombining the 3 equations
NQ (i, 1) = RT (i, 1) * Xo (1)NQ (i, 1) = RT (i, 1) * Xo (1)
Xo (1) = 1 / Xo (1) = 1 / RT (i,1)RT (i,1)
RT (i, 1) = Di * (1 + NQ (i, 0)) =RT (i, 1) = Di * (1 + NQ (i, 0)) =
Di * (1 + 0) = DiDi * (1 + 0) = Di
n = 1
© 1995 Daniel A. Menascé
Mean Value Analysis Mean Value Analysis Combining the 3 equationsCombining the 3 equations
NQ (i, 2) = RT (i, 2) * Xo (2)NQ (i, 2) = RT (i, 2) * Xo (2)
Xo (2) = 2 / Xo (2) = 2 / RT (i,2)RT (i,2)
RT (i, 2) = Di * (1 + NQ (i, 1)) RT (i, 2) = Di * (1 + NQ (i, 1))
n = 2
© 1995 Daniel A. Menascé
Mean Value AnalysisMean Value AnalysisExampleExample
n RT(cpu) RT(disk) Ro Xo NQ(cpu) NQ(disk)0 0.00 0.00 0.00 0.00 0.00 0.001 0.56 0.68 1.24 0.81 0.45 0.552 0.81 1.05 1.87 1.07 0.87 1.133 1.05 1.45 2.50 1.20 1.26 1.74
© 1995 Daniel A. Menascé
Revisiting the C/S migration Revisiting the C/S migration exampleexample
Response Time vs. No. ClientsResponse Time vs. No. Clients
0
1
2
3
4
5
6
20 30 40 50 60 70 80
SLA
© 1995 Daniel A. Menascé
C/S example: additional diskC/S example: additional disk Response Time vs. No. ClientsResponse Time vs. No. Clients
0
1
2
3
4
5
6
50 60 70 80
Orig.Server
Add.Disk
SLA
© 1995 Daniel A. Menascé
Part V:Part V:Advanced Models for the Advanced Models for the
Performance Prediction of C/S Performance Prediction of C/S SystemsSystems
© 1995 Daniel A. Menascé
Example: Telemarketing Example: Telemarketing ApplicationApplication
Customers order products through a Customers order products through a catalog. catalog.
Orders are made by phone using a credit Orders are made by phone using a credit card. card.
30,000 orders are received every day.30,000 orders are received every day. Calls are placed on hold for the first Calls are placed on hold for the first
available representative. available representative.
© 1995 Daniel A. Menascé
Example: Telemarketing Example: Telemarketing ApplicationApplication
Question:Question:
How many representatives are needed How many representatives are needed to guarantee that an incoming call will to guarantee that an incoming call will not have to wait more than 5 sec on the not have to wait more than 5 sec on the average?average?
© 1995 Daniel A. Menascé
Example: Telemarketing Example: Telemarketing applicationapplication
DB server
LAN
© 1995 Daniel A. Menascé
Example: Telemarketing Example: Telemarketing ApplicationApplication
mm (to be determined ) workstations and (to be determined ) workstations and an SQL server.an SQL server.
Ethernet LAN (10 Mbps)Ethernet LAN (10 Mbps) SQL server: one CPU and one disk. SQL server: one CPU and one disk.
© 1995 Daniel A. Menascé
Telemarketing ApplicationTelemarketing Application Hierarchical Model Hierarchical Model
User Model
C/S model
1
m
call arrivalrate
Averagewaitingtimeper call
Xc (k) k=0, ..., m
application,server, andLANparameters
© 1995 Daniel A. Menascé
Telemarketing ApplicationTelemarketing ApplicationUser Level ModelUser Level Model
0 1 2 m k. . . . . . . . .
Xc (1) Xc (2) Xc (m) Xc (m) Xc (m)
k = no. of calls in the system
© 1995 Daniel A. Menascé
Telemarketing ApplicationTelemarketing ApplicationUser Level ModelUser Level Model
• Computation of the average call arrival rate
• 30,000 calls/day• 12 hours of operation per day• balanced traffic during the day:
30 000
12 3 6000 69
. /
.. / sec
calls daycalls
© 1995 Daniel A. Menascé
User Level ModelUser Level Model
0 1 2 m k. . . . . . . . .
Xc (1) Xc (2) Xc (m) Xc (m) Xc (m)
• Flow balance equations: state 0: p(0) = Xc(1) . p(1)
© 1995 Daniel A. Menascé
User Level ModelUser Level Model
0 1 2 m k. . . . . . . . .
Xc (1) Xc (2) Xc (m) Xc (m) Xc (m)
• Flow balance equations: state 0: p(0) = Xc(1) . p(1) state 2: p(1 ) = Xc(2) . p(2)
© 1995 Daniel A. Menascé
User Level ModelUser Level Model
0 1 2 m k. . . . . . . . .
Xc (1) Xc (2) Xc (m) Xc (m) Xc (m)
• Flow balance equations: state 0: p(0) = Xc(1) . p(1) state 2: p(1 ) = Xc(2) . p(2) ........... state m: p(m-1) = Xc(m). p(m)
© 1995 Daniel A. Menascé
User Level ModelUser Level Model
0 1 2 m k. . . . . . . . .
Xc (1) Xc (2) Xc (m) Xc (m) Xc (m)
• Flow balance equations: state 0: p(0) = Xc(1) . p(1) state 2: p(1 ) = Xc(2) . p(2) ........... state m: p(m-1) = Xc(m). p(m) ........... state k: p(k-1) = Xc(m). p(k)
© 1995 Daniel A. Menascé
User Level ModelUser Level Model
0 1 2 m k. . . . . . . . .
Xc (1) Xc (2) Xc (m) Xc (m) Xc (m)
• Solution to flow balance equations:
p k PXc ii
k
( ) ( )( )
010
1
X j X m j mc c( ) ( )
© 1995 Daniel A. Menascé
User Level ModelUser Level Model• Solution to flow balance equations:
P P X X kkk
c c 0 1 / ( ( )... ( )) k m
P X X m X mkc c c
k m0 1 /[ ( )... ( )( ( )) ]
k m
© 1995 Daniel A. Menascé
User Level ModelUser Level Modelaverage waiting time per call, Waverage waiting time per call, W
W N kPw kw
k
/ ( / ) 11
where
P Pkw
jj
m
0k 0
k 0 Pk m
© 1995 Daniel A. Menascé
C/S ModelC/S Model
cpu
disk
completing transactions
LANClient
DB servercompleting transactions
© 1995 Daniel A. Menascé
C/S ModelC/S Model
• If the LAN utilization is very low, model it as a delay device (e.g., in high bandwidth LAN segments).• If the utilization is greater than 20%, model the LAN as a load dependent device.• Bridges and routers should be modeled as delay devices where the delay is the latency in sec/packet.
© 1995 Daniel A. Menascé
Telemarketing ApplicationTelemarketing ApplicationAverage waiting time per callAverage waiting time per call
0
200
400
600
800
1000
1200
1400
125 135 145 155 165 175 185 195no. clients
waitingtime (sec)
© 1995 Daniel A. Menascé
Telemarketing ApplicationTelemarketing ApplicationAverage waiting time per callAverage waiting time per call
0
1
2
3
4
5
6
7
8
9
150 155 160 165 170 175 180 185
No. clients
waiting time (sec) minimum no. representatives: 176
© 1995 Daniel A. Menascé
Part VI:Part VI:Capacity Planning Case Study for Capacity Planning Case Study for
C/S Environments:C/S Environments:A Retailing CompanyA Retailing Company
(example adapted from Giacone’94)(example adapted from Giacone’94)
© 1995 Daniel A. Menascé
Retailing Company: initial Retailing Company: initial configurationconfiguration
mainframe
© 1995 Daniel A. Menascé
Retailing company: new configurationRetailing company: new configuration
mainframe
4 MB
16 MB
56 Kbps
server
router
router
© 1995 Daniel A. Menascé
Retailing CompanyRetailing Company
Mainframe stores enterprise DB in DB2.Mainframe stores enterprise DB in DB2. Several times during the day detail records Several times during the day detail records
are sent from all stores to the mainframe.are sent from all stores to the mainframe. A C/S application was developed to A C/S application was developed to
efficiently support a Decision Support efficiently support a Decision Support System (DSS). System (DSS).
© 1995 Daniel A. Menascé
Retailing Company Retailing Company The C/S application extracts and formats The C/S application extracts and formats
data from the mainframe and make them data from the mainframe and make them locally available. locally available.
Two UNIX servers are being considered: HP Two UNIX servers are being considered: HP and NCR.and NCR.
Question: Question: how many clients can be how many clients can be supported by each type of server while supported by each type of server while keeping response times at acceptable levels? keeping response times at acceptable levels?
© 1995 Daniel A. Menascé
Retailing Company :Retailing Company :configuration alternativesconfiguration alternatives
Client:Client:– PC 486PC 486
– 16 MB/Windows 3.116 MB/Windows 3.1 NCR DB server:NCR DB server:
– UNIXUNIX
– ORACLEORACLE
– NCR 3555 4-Pentium (66 MHz)NCR 3555 4-Pentium (66 MHz)
– 256 MB RAM256 MB RAM
– SCSI disksSCSI disks
© 1995 Daniel A. Menascé
Retailing Company :Retailing Company :configuration alternativesconfiguration alternatives
HP DB serverHP DB server– UNIXUNIX– ORACLEORACLE– HP 9000-H70 2 processors (96 MHz)HP 9000-H70 2 processors (96 MHz)– 256 MB RAM256 MB RAM– SCSI disksSCSI disks
© 1995 Daniel A. Menascé
Retailing Company :Retailing Company :configuration alternativesconfiguration alternatives
LAN between client and DB server:LAN between client and DB server:– Token Ring 4 MbpsToken Ring 4 Mbps– TCP/IPTCP/IP
Link between LAN and mainframeLink between LAN and mainframe– 3 Kbytes/seg (38.4 Kbps) effective. 3 Kbytes/seg (38.4 Kbps) effective.
© 1995 Daniel A. Menascé
Retailing Company :Retailing Company :model parameterizationmodel parameterization
A typical transaction was developed.A typical transaction was developed. The transaction was executed several times The transaction was executed several times
through a “script” on each server. through a “script” on each server. Used measurement utilities and tools: Used measurement utilities and tools:
System Activity Reporter (sar), ps, netstat, System Activity Reporter (sar), ps, netstat, accounting, SPI (NCR)accounting, SPI (NCR), e , e PCS (HP)PCS (HP)..
© 1995 Daniel A. Menascé
Retailing Company :Retailing Company :CPU service demand for NCR server CPU service demand for NCR server
%usr %sys %wio %idle
10:44 23 10 1 66
10:45 72 20 2 6
10:46 70 20 2 8
... ... ... ... ...
10:58 39 11 4 46
Total 1267
UNIX : sar -u
© 1995 Daniel A. Menascé
Retailing Company :Retailing Company : CPU service demand for NCR server CPU service demand for NCR server
Dcpu =
1,267% / 15 * 900 sec * 4
9,600 transactions
=
avg.utilization
measurementinterval
no.processors
.32 sec/transaction
© 1995 Daniel A. Menascé
Retailing Company :Retailing Company : CPU service demand for HP serverCPU service demand for HP server
CPU%
07:40 54.1
07:41 53.7
... ...
07:45. 53.1
HP PCS:
Ucpu = 53.5% 1,535 transactions
© 1995 Daniel A. Menascé
Retailing Company :Retailing Company : CPU service demand for HP serverCPU service demand for HP server
Dcpu =
53.7 % * 300 sec * 2
1,535 transactions
=
avg.utilization
measurementinterval
no.processors
.208 sec/transaction
© 1995 Daniel A. Menascé
Retailing Company :Retailing Company : disk service demand for NCR serverdisk service demand for NCR server
“NCR SPI Disk I/O and Service Detail”
10:44 %Busy # Reads # Writes msec
d0100 1.0 0 43 13.5
d1010 49.6 1 2100 14.2
d0010 0.3 1 8 21.2
... ... ... ... ...
Total 3 31495
9,600 transactions
© 1995 Daniel A. Menascé
Retailing Company :Retailing Company : disk service demand for NCR serverdisk service demand for NCR server
disco Vr Vw S D0100 0.0000 0.059 13.2 0.781010 0.0003 3.113 14.2 44.210010 0.0001 0.012 20.8 0.25
© 1995 Daniel A. Menascé
Retailing Company :Retailing Company : disk service demand for HP serverdisk service demand for HP server
PCS from 7:30 to 7:35
08:30 %Busy # Reads # Writes
d1008 0.1 90 0
d1009 1.2 270 0
d1000 7.5 0 1680
... ... ... ...
1,525 transactions
© 1995 Daniel A. Menascé
Retailing Company :Retailing Company : disk service demand for HP serverdisk service demand for HP server
disco Vr Vw S D1008 0.30 0.00 14.1 4.161009 0.89 0.00 13.5 11.951000 0.00 5.51 12.5 68.85
© 1995 Daniel A. Menascé
Response Time vs. No. ClientsResponse Time vs. No. Clients
0.00
2.00
4.00
6.00
8.00
10.00
12.00
14.00
16.00
18.00
20.00
600 650 700 750 800 810 815 900 950 1000 1050
RncrRhp
sec
HP
NCR
no. clients
© 1995 Daniel A. Menascé
Concluding RemarksConcluding Remarks
C/S environments offer multiple C/S environments offer multiple configuration alternatives: capacity, configuration alternatives: capacity, quantity and server location, connectivity quantity and server location, connectivity and network capacity. and network capacity.
Decisions related to system sizing require Decisions related to system sizing require the use of predictive performance models. the use of predictive performance models.
Analytic models are the best alternative for Analytic models are the best alternative for quickly analyzing multiple scenarios. quickly analyzing multiple scenarios.
© 1995 Daniel A. Menascé
BibliographyBibliography Book:Book:
– Capacity Planning and Performance Modeling: from Capacity Planning and Performance Modeling: from mainframes to clients-servers systemsmainframes to clients-servers systems, D. A. Menascé, , D. A. Menascé, V. A. F. Almeida, L. W. Dowdy, Prentice Hall, 1994.V. A. F. Almeida, L. W. Dowdy, Prentice Hall, 1994.
Papers:Papers:– G. GiaconeG. Giacone, Real World Client/Server Sizing, Real World Client/Server Sizing, Proc. of , Proc. of
CMG’94 , Dec., 1994. CMG’94 , Dec., 1994. – J. Gunther, J. Gunther, Benchmarking a Client/Server ApplicationBenchmarking a Client/Server Application, ,
Proc. CMG’94, Dec., 1994. Proc. CMG’94, Dec., 1994.
© 1995 Daniel A. Menascé
BibliographyBibliography Papers:Papers:
– M. SalsburgM. Salsburg, Capacity Planning in the Interoperable , Capacity Planning in the Interoperable EnterpriseEnterprise, Proc. CMG’94, Dec., 1994., Proc. CMG’94, Dec., 1994.
– T. Leo e D. RobertsT. Leo e D. Roberts, Benchmarking the File Server , Benchmarking the File Server Performance and CapacityPerformance and Capacity, Proc. CMG’94, Dec., 94., Proc. CMG’94, Dec., 94.
– Bell, T. E. and Falk, A. M., Bell, T. E. and Falk, A. M., Measuring Application Measuring Application Performance in Open SystemsPerformance in Open Systems, Proc. CMG’92 , Dec., , Proc. CMG’92 , Dec., 1992.1992.
– Ho, E., Ho, E., Performance Management of Distributed Performance Management of Distributed Open SystemsOpen Systems, Proc. CMG’92, Dec., 1992., Proc. CMG’92, Dec., 1992.
© 1995 Daniel A. Menascé
BibliographyBibliography Papers:Papers:
– Hufnagel, E., Hufnagel, E., The Hidden Costs of Client/Server, Your The Hidden Costs of Client/Server, Your Client/Server Survival KitClient/Server Survival Kit, supplement to Network , supplement to Network Computing, Vol. 5, 1994.Computing, Vol. 5, 1994.
– Information Technology Group, Information Technology Group, Cost of Computing, Cost of Computing, Comparative Study of Mainframe and PC/LAN Comparative Study of Mainframe and PC/LAN InstallationsInstallations, Mountain View, CA, 1994., Mountain View, CA, 1994.
– National Software Testing Laboratories, National Software Testing Laboratories, High High Performance 486 DX2 and Pentium SystemsPerformance 486 DX2 and Pentium Systems , PC Digest , PC Digest Ratings Report, Vol. 8, Number 2, February, 1994.Ratings Report, Vol. 8, Number 2, February, 1994.
© 1995 Daniel A. Menascé
BibliographyBibliography
Papers:Papers:– Vicente, J., Vicente, J., Network Capacity PlanningNetwork Capacity Planning, Proc. , Proc.
CMG’93, Dec. 1993. CMG’93, Dec. 1993. – Waldner, R., Waldner, R., Client/Server Capacity PlanningClient/Server Capacity Planning, ,
Proc. CMG’92, Dec. 1992.Proc. CMG’92, Dec. 1992.– Menascé , D., and V. Almeida, Menascé , D., and V. Almeida, Two-Level Two-Level
Performance Models of Client-Server SystemsPerformance Models of Client-Server Systems,,
Proc. CMG’94, Dec. 1994.Proc. CMG’94, Dec. 1994.
© 1995 Daniel A. Menascé
BibliographyBibliography
Papers:Papers:– Petriu, D. and C. Woodside, Petriu, D. and C. Woodside, ApproximateApproximate
MVA for Markov Models of Client/Server MVA for Markov Models of Client/Server Systems,Systems, Proc. Third IEEE Symp. Parallel and Proc. Third IEEE Symp. Parallel and
Distributed Processing, Dallas 1991.Distributed Processing, Dallas 1991.– Rolia, J.A., M.Starkey, and G.Boersma, Rolia, J.A., M.Starkey, and G.Boersma,
Modeling RPC PerformanceModeling RPC Performance, Proc. IBM , Proc. IBM Canada CASCON’93, Toronto, Oct. 1993.Canada CASCON’93, Toronto, Oct. 1993.
© 1995 Daniel A. Menascé
THE ENDTHE END