Lessons of 35 Years

Some Systems, Applications
and Models I Have Known
Ken Sevcik
University of Toronto
June 16, 2004
Sigmetrics and Performance 2004
1
Overview

In the past 35 years, …




Systems Have Changed
Applications Have Grown
Models Have Matured and Adapted
… and some interesting problems
have been encountered
June, 2004
Sigmetrics and Performance 2004
2
First Research Application:
Probability of a Voters’ Paradox



C candidates for election
V voters with strict preference orderings
Can one candidate beat each other pairwise?
Example: V = 3 & C = 3
V1 : X > Y > Z
V2 : Y > Z > X
V3 : Z > X > Y
Then, in pair-wise elections,
X beats Y ;
and Y beats Z ;
yet Z beats X !
Paradox occurs in 12 of the (3!)3 = 216 possible configurations.
In general, there are (C!)V voting configurations.
June, 2004
Sigmetrics and Performance 2004
3
My first “personal” computer:
IBM System 360 Model 30 with BOS
June, 2004
Sigmetrics and Performance 2004
4
Exact Probabilities of Voters’ Paradox


V = 3 & C = 3  12 cycles in 216 configs.
V=7&C=7
26,295,386,028,643,902,475,468,800 cycles in
82,606,411,253,903,523,840,000,000 configs.
(Computed in approximately 40 hours of CPU time.)
C=
3
5
7
~ 40
V=3
V=5
V=7
.0555…
.06944…
.075017
.1600…
.19999525
.215334
.238798185941
.295755170299
.318321370333
~ .61
~ .71
~ .74
V ~ 40
~ .09
~ .24
~ .36
~ .80
June, 2004
Sigmetrics and Performance 2004
5
Job Sequencing on a Single Processor
(using service time distribution knowledge)
“Smallest Rank” (SR) Scheduling:
Minimize
Investment
Payoff
=
(quantum length)
(Pr [Completion])
Service Time Knowledge
exact
average distribution
No
SPT
Yes
SRPT
SEPT
SEPT
Preemption
Allowed?
June, 2004
SERPT
Sigmetrics and Performance 2004
SR
6
Job Sequencing with
Two Processors & Two Customers
Extending “Shortest First” to Multiple Resources
t A,1 , t B ,1
SBT-RSBT -- Based on
average service time per visit of
each customer at each resource
t A, 2 , t B , 2
SBT:
RSBT:
t A, k
 t B ,k
t A,1
t A,1  t A, 2
June, 2004


t B ,1
t B ,1  t B , 2
Sigmetrics and Performance 2004
A gets priority at k
 A gets priority at 1
7
In the Beginning …

Single Server Queue

Many variations



arrival process, service process
multiple servers, finite buffer size
scheduling discipline


N,Z
FCFS, RR, FBn, PS, SRPT, …

S
RR, FBn, and PS increased relevance of models
June, 2004
Sigmetrics and Performance 2004
8
Queuing Network Models
“Central Server” Model
“Separable”
(or “product form”)
models
N customers
Z avg. think time
and efficient
computational algorithms
Variants:
Open, Closed, Mixed
scheduling disciplines
June, 2004
K centers
Dj demand at j
Sigmetrics and Performance 2004
9
The “Great Debate”:
Operational Analysis vs. Stochastic Modeling

SM




Ergodic stationary Markov process in equilibrium
Coxian distributions of service times
independence in service times and routing
OA



finite time interval
measurable quantities
testable assumptions
OA made analytic modelling accessible to capacity
planners in large computing environments
June, 2004
Sigmetrics and Performance 2004
10
Uses and Analysis of
Queuing Network Models

Applications


System Sizing; Capacity Planning; Tuning
Analysis Techniques

Global Balance Solution


Bounds Analysis



Exact (Convolution, eMVA)
Approximate (aMVA)
Generalizations beyond “Separable” Models

June, 2004
Asymptotic Bounds (ABA), Balanced System Bounds (BSB)
Solutions of “Separable” Models


Massive sets of Simultaneous Linear Equations
aMVA with extended equations
Sigmetrics and Performance 2004
11
Bounding Analysis Case Study:
Insurance Company with 20 sites

Upgrade alternatives:
Upgrade
Current
#1
#2
Dcpu Dio
4.6
5.1
3.1
4.0
1.9
1.9
Dtot
Improvement
10.6
7.0
5.0
----1.5 to 2.0
2.0 to 3.5
ABA Inputs:
N, Z, Dtot, Dmax
Throughput Bound:
 N
1 
X  min 
,

D

Z
D
max 
 tot
Response Time Bound:
R  max Dtot , N Dmax  Z 
June, 2004
Sigmetrics and Performance 2004
12
Bounding Analysis Case Study:
Insurance Company with 20 sites

Upgrade alternatives:
Upgrade
Current
#1
#2
Dcpu Dio
4.6
5.1
3.1
4.0
1.9
1.9
Dtot
Improvement
10.6
7.0
5.0
1.5 to 2.0
2.0 to 3.5
.4
#2
.3
Cur
X
.2
#1
.1
2
June, 2004
4
6
Sigmetrics and Performance 2004
8
10
N
13
Bounding Analysis Case Study:
Insurance Company with 20 sites

Upgrade alternatives:
Upgrade
Current
#1
#2
Dcpu Dio
4.6
5.1
3.1
4.0
1.9
1.9
Dtot
Improvement
10.6
7.0
5.0
1.5 to 2.0
2.0 to 3.5
#1
20
Cur
#2
15
R
10
5
2
June, 2004
4
6
Sigmetrics and Performance 2004
8
10
N
14
Exact Mean Value Analysis Algorithm
Initialize (for zero customers):
 k , Qk 0  0
Iterate up to N customers:
for n = 1, … , N
Set Arrival Instant Queue Lengths:
 k,
Ak n   Qk (n 1)
Set Residence Time:
 k,
Rk n  Dk 1  Ak (n)
Understandable and Easy to Implement
June, 2004
Sigmetrics and Performance 2004
15
Approximate Mean Value Analysis
Initialize to Equal Queue Lengths:
 k,
N
Qk  N  
K
Iterate until convergence:
loop until Qk ( N ) are stable
Revise Arrival Instant Queue Lengths:
 k,
N 1
Ak  N  
Qk ( N )
N
Revise Residence Times:
 k,
Rk N   Dk 1  Ak ( N )
Substantial time savings; Little loss of accuracy
June, 2004
Sigmetrics and Performance 2004
16
“Details” of Real Systems

Going beyond “Separable” models

Priority Scheduling


Alter MPL limit N , or Dpaging
I/O Subsystems (simultaneous resource possession)


Reflect coefficient of variation in service times
Memory Constraints



FCFS with high variance service times


Alter Residence Time equation

Rk N   Dk 1  H hep ( N )
Reflect contention by inflating Ddisk
Enhanced Utility of QNM’s for Real Systems
June, 2004
Sigmetrics and Performance 2004
17
System Sizing Case Study:
NASA Numerical Aerodynamic Simulator
GOAL: to attain a sustainable Gigaflop
Cray 1
Data Mgmt
Work Stations
Cray 2
Cray 3
Graphics
QNM’s proved more useful than a simulation model
June, 2004
Sigmetrics and Performance 2004
18
QNM’s for Capacity Planning & Tuning


Existing system with measurable workload
“What if …”









… the workload volume increases?
… the workload mix changes?
… the processor is upgraded?
… memory is added?
… the I/O configuration is enhanced?
… class priorities are adjusted?
… file placements are changed?
… changing usage of memory?
CAPACITY
PLANNING
TUNING
Answer by changing model parameters
June, 2004
Sigmetrics and Performance 2004
19
Capacity Planning Case Study:
FAA Air Traffic Control System


~ 40 distributed air traffic control centers
Each with the SAME:




But DIFFERENT:


software
hardware family
35 transaction types
transaction volumes and mixes
Single QNM (one class per transaction type)
supports capacity planning for all sites
June, 2004
Sigmetrics and Performance 2004
20
QNM’s for
System and Architecture Analysis

Architectures


Communication networks

Local Area Networks


Rings, buses
Store and Forward



caching structures
flow control
end to end response time
Interconnection networks

June, 2004
omega, shuffle-exchange, …
Sigmetrics and Performance 2004
21
SE&EU Interconnection Network
Source
Exchange
Unshuffle
Shuffle
Exchange
June, 2004
Destination
000
000
001
001
010
010
011
011
100
100
101
101
110
110
111
111
Sigmetrics and Performance 2004
22
SE&EU operation
Combination Lock Algorithm:
Sn Sn-1 Sn-2
S4 S3 S2 S1
Bn-2
Bn-1
Bn
B1
B2
Bn-3
B3
B4
(Longest
Matching
Bit String)
Dn Dn-1 Dn-2
D4 D3 D2 D1
SE: Left 3
EU: Right 5
SE: Left 2
Up to 40% increase in throughput
June, 2004
Sigmetrics and Performance 2004
23
Network for NASA’s Space Station
(circa 1984)

Distributed LAN for many components
Space Station
Orbital
Platform
Tethered
Platform
Shuttle
Extra-Vehicular
Activity
Results:
Some properties of
the FDDI Protocol
June, 2004
Ground Station
Sigmetrics and Performance 2004
24
Architectural Analysis Case Study:
NUMAchine

4 x 4 x 4 Hierarchical Ring Architecture
Setting Routing Priorities:
Continuing vs. Upward
Exiting vs. Entering
Message Handling:
Contiguous vs. Interleaved
Shortest First ?
June, 2004
Sigmetrics and Performance 2004
25
Job Scheduling for Parallel Processing
Variants:
Job j = ( tj , pj )
Static
Moldable
Malleable
Dynamic
1
2
3
processors
P
time
June, 2004
Sigmetrics and Performance 2004
26
Parallelism: Early or Late ?

Problem

Schedule N jobs of two tasks each on two processors
to minimize average residence time

Each pair of jobs can be executed as …
PARALLEL:
j1
SEQUENTIAL:
j2
j1
j2
overhead of parallel execution
June, 2004
Sigmetrics and Performance 2004
27
Parallelism: Early or Late ?

Results of two similar studies:

[RN et al.] Start parallel; Finish sequential
P
June, 2004
P
P
P
P
P
S
S
Sigmetrics and Performance 2004
S
S
S
S
28
Parallelism: Early or Late ?

Results of two similar studies:

[RN et al.] Start parallel; Finish sequential
P

P
P
P
P
S
S
S
S
S
S
[KCS] Start sequential; Finish parallel
S
S
June, 2004
P
S
S
S
S
P
P P
Sigmetrics and Performance 2004
P
P
P
29
Parallelism: Early or Late ?

Results of two similar studies:

[RN et al.] Start parallel; Finish sequential
P

P
P
P
P
P
S
S
S
S
S
S
[KCS] Start sequential; Finish parallel
S
S
S
S
S
S
P
P P
Differences in assumptions:
P
P
Some variability in task service times (  or
Some overhead of parallelism (  ) [KCS]
June, 2004
Sigmetrics and Performance 2004
P
 
) [RN]
30
Parallelism: Early or Late ?

Resolution

increasing
P
PP
PPS
PPSS
PPSSS
June, 2004
P
PP
PPS
PSSS
SSSSS
P
PP
PPP
PPPP
PPPPP
P
PP
PPP
SSSS
SSSSS
S
SS
SSS
SSSS
SSSSS
 increasing
P
PP
SPP
SSSP
SSSSS
Sigmetrics and Performance 2004
P
PP
SPP
SSPP
SSSPP
31
Distributed Processing Models

Processor selection strategies


local vs. global execution
Load Sharing

June, 2004
sender-initiated vs. receiver-initiated
Sigmetrics and Performance 2004
32
Small example:
Individual Versus Social Optimum

Arriving customers must pick one of two
processors, one fast and one slow:

pF
pS
Individual Optimum:
Pick server with lower response time
(  response times are equalized)
Social Optimum:
Control pF to minimize avg. response time
June, 2004
Sigmetrics and Performance 2004
F
F
S
S
33
Resolution of Social and Individual Goals
Individual Optimum:
p
IND
F
1
   F   S 

2
Social Optimum minimizes:


pFSOC


SOC
  F  pF  
Toll on F:




1  pFSOC

 
SOC
  S  1  pF  


1
1

SOC
 S  1  pF 
 F  pFSOC 
1  pFSOC / (1  pFSOC )


p FSOC

Rebate on S:
SOC
1  pF


RESULT: Everybody Wins !!!
June, 2004
Sigmetrics and Performance 2004
34
Anomaly of High Dimensional Spaces
2k Spheres (radius = 1) in
Cube (vol. 4k & 2 k sides) +2
and an Inner sphere
1. Pointy-ness Property
Dcorner

k
Dside
0
2. Radius of Inner Sphere
Rred

R2 = .414
3. Volume Ratio
June, 2004
k 1
-2
R10 = 2.16 !!!
Vred
Vcube
-2
0
+2
  as k  
Sigmetrics and Performance 2004
35
Diagonal of a k-dimensional Cube
(Example: k = 25 )
Corners =


k 1
Red = 2 


k 1
Blues = 2
June, 2004
Sigmetrics and Performance 2004
36
Diagonals of Cube
Blue width = 2
K=1
Red width = 2 
Corner width =



k 1
K=2
K=3
K=4
June, 2004
Sigmetrics and Performance 2004

k 1
37
Diagonals of Cube
K=9
k 1
2
K = 121
(There are 2121
blue spheres)
June, 2004
Sigmetrics and Performance 2004
38
Multidimensional Databases
Relational View:
A1 A2 A3 A4
(Records of k Attributes)
…
Multidimensional View:
Ak-1 Ak
(Points in k-dimensional space)
A1
Indexing Support for:
-----
A3
point search
range search
similarity search
clustering
A2
June, 2004
Sigmetrics and Performance 2004
39
Bounding Spheres and Rectangles
1
rsphere 
2
k
rsphere 
2
circumscribed
Dim k
sphere
-------- ---------------2
1.57
4
4.93
8
64.94
16
15422.64
June, 2004
inscribed
ratio of
cube
sphere
volumes
---------- --------------- ------------1.00
.785
2
1.00
.308
16
1.00
.0159
4096
1.00
.000004 4294967296
Sigmetrics and Performance 2004
40
Edge Density in High-Dimensions

Proportion of points near some side:

Pr d edge  
1
1 2
June, 2004

 1  1 2 
k
Fraction near some edge:
k eps =
---1
2
4
8
16
.002
-----.004
.007
.015
.031
.062
Sigmetrics and Performance 2004
.020
-----.040
.078
.150
.278
.479
.200
----.400
.640
.870
.983
.999
41
Lessons and Conclusions

Exact answers are overrated

accurate approximate answers often suffice


Analytic models have an important role

quick, inexpensive answers in many situations


(e.g., Voters’ Paradox and aMVA )
(e.g., Insurance Co., NAS System, and FAA System )
Assumptions matter

subtle differences can have big effects

June, 2004
(e.g., in Early or Late Parallelism, NUMAchine analysis
and PRI vs. FCFS or PS)
Sigmetrics and Performance 2004
42
What is the “best” way to attain large
improvements in computer performance?



June, 2004
-- Analysis?
-- Simulation?
-- Experimentation?
Sigmetrics and Performance 2004
43
What is the “best” way to attain large
improvements in computer performance?




-- Analysis?
-- Simulation?
-- Experimentation?
None of the above …
Just wait 30 years!!!
June, 2004
Sigmetrics and Performance 2004
44
ACM Sigmetrics &
IFIP W.G. 7.3 ,
Thanks for the memories …
June 16, 2004
Sigmetrics and Performance 2004
45
Problems with Voting Systems

Problems have occurred recently in ..

France (lowest eliminated)



R>M>L
L>M>L
M > (R, L)



40%
40%
20%
Middle eliminated in first round though rank score (2.2)
Beats rank score of others (1.9)
USA (primaries, and electoral college)


June, 2004
E.g., McCain loses to Bush in primaries although he
Might be both candidates in a final election
Sigmetrics and Performance 2004
46
Exact Mean Value Analysis Algorithm
 k , Qk 0  0
for n = 1, … , N
 k , Ak n   Qk (n 1)
 k,
Rk n  Dk 1  Ak (n)
K
R (n)   Rk (n)
k 1
X ( n)  n / ( R ( n)  Z )
 k , Qk n   X (n) Rk (n)
end for
June, 2004
-- Understandable
-- Easy to implement
-- Arrival Instant Theorem
Sigmetrics and Performance 2004
47
Approximate Mean Value Analysis
Qk N   N / K
 k,
loop
 k,
 k,
Ak N   [( N  1) / N ] Qk ( N )

Rk N   Dk 1  H hep ( N )

K
R ( N )   Rk ( N )
k 1
X ( N )  N / (R ( N )  Z )
 k , Qk N   X ( N ) Rk ( N )
-- Substantial time savings
-- Little loss of accuracy
exit when X(N) and R(N) converge
end loop
June, 2004
Sigmetrics and Performance 2004
48
The Case for Popt = 1 :
Tj  p   j  p


Wj
p
j  j p
(Assume p > 1  Ej (p) < 1 )
Argument:




June, 2004
Demand is insatiable (unbounded backlog)
Economies of scale (100’s of users)
“Good” systems will be heavily used
Parallelism overhead decreases throughput
and increases queuing times
Sigmetrics and Performance 2004
49
System Sizing Case Study:
NASA Numerical Aerodynamic Simulator
June, 2004
Sigmetrics and Performance 2004
50
Quiz #1:
Sequence Two Jobs on a Processor

Service Times:
t1 = 4
t2 = 1 w. prob. .5
10 w. prob. .5

Rank Calculations:
Job
Attained
1
2
2
2
0
0
0
1
June, 2004
Investment
4
1
5.5
9
Sigmetrics and Performance 2004
Payoff
1.0
.5
1.0
1.0
Rank
4.0
2.0
5.5
9.0
51
Two Spheres
k /2
1/2
June, 2004
Sigmetrics and Performance 2004
52