Lecture 10 - Performance evaluation
Download
Report
Transcript Lecture 10 - Performance evaluation
Performance Evaluation
M/M/1
Quantitative Method
Performance Evaluation – Quantitative Method M/M/1
Abstract System/ Black Box
SYSTEM
Resource
X
N
Arrivals
Service Time
Completions
(A)
(S)
(C)
Busy (B) – Length of time that the resource
was observed to be in use
Service Time
B
S=
C
Arrival Rate
A
=
l
T
R
Time (T) – Fraction of time the system is
observed
Throughput
C
=
X
T
Utilization
B
=
U
T
Performance Evaluation – Quantitative Approach
A-
Arrivals
C-
Completions
T-
Time the system is observed
B-
Busy; fraction of time system is being used’
S-
Avg. service time
S=
B
C
X-
Throughput
X=
C
T
λ-
arrival rate
A
l=
T
U-
Utilization
B C
=
*
=
*
U S X
C T
U=
B
T
System Arrival and Completions
15
14
13
Customers
in system
12
11
10
Jobs
9
8
7
Arrivals
6
Completion
5
4
3
2
1
Time
0
2
0
Accumulated Time in System
W i 1Ti
k
4
Avg. Residence Time
R W
C
6
Little’s Law
W
N X R
T
Little’s Law
N k fk k
k
k
n(t)
N
C
N X
Number of
customers in
the black box
k
N
t
0
rk
Total time that there are k customers in the black box
k r
k
k
C
R
rk
Performance Evaluation – Quantitative Approach
W
R
C
W-
Accumulated time in system
N-
Average number of requests in system
C W
W
N X R
T C
T
Z-
R-
Avg. think time
Response Time
R
N
Z
X
Performance Evaluation – Quantitative Approach
Utilization Law:
Uk = XkSk
Little’s Law:
N = XR
The Response Time Law:R = N/X – Z
The Forced Flow Law:
Xk = VkX
Performance Evaluation – Quantitative Approach
Example
Determine avg. system response time for an interactive system with following
characteristics
25 terminals (N = 25)
18 sec average think time (Z = 18)
20 visits to specific disk per interaction (Vd = 20)
30% utilization of disk (Ud = .30)
25 millisecond – avg. service requirement per visit to disk (Sd = .025 sec)
Find R, Xd, X
Xd = Ud/Sd
= .30/.025 =
12 req/sec
X = Xd/Vd
= 12/20 =
0.6 interactions/sec
R = N/X – Z
= 25/0.6 -18 =
23.7 secs
Performance Evaluation
M/M/1
Analytical Method
Performance Evaluation – Analytical Method (M/M/1)
Birth-Death Process (M/M/1)
Arrivals (A)
Completions (C)
N = Avg # of IORB in the system
The arrival of a new IORB is called a birth
IORB
I/O
K
K+1
IORB
Time it takes to give service (S)
# of IORBs in the system
T
A
C
S
l
K-1
Time we observe the system
# of Arrival
# of Completions
Service Time
A
Arrival Rate
l
T
Completion Rate
The completion of an IORB is called a
death
1
S
K
IORB
N lim N (t )
t
* All these when system is in steady state
Performance Evaluation – Analytical Method (M/M/1)
l
0
l
1
l
l
2
3
4
…
l
l
k
k-1
Flow in = flow out
The flow across the line to the right is
the probability of being in state (k-1)
times the rate at which the system
transitions from state (k-1) to k
l Pk 1
N
Avg. # of IORB in the system
Pk
Fraction of time server has k IORBs
rk
N k
t
k
Pk 1
The flow across the line to the left is the
probability of being in state k times the
avg. service rate
Pk
N k Pk
k
k 0
p0 p1 p2 p3 ... pk 1
N
0
t
rk
N k fk k
rk
t
Performance Evaluation – Analytical Method (M/M/1)
l
P1 l P0 P1 P0
Flow out
P
k 0
k
P0 P1 P2 ... P0U k 1
k 0
Flow in
l
l
P2 l P1 P2 P1 P2 P0
2
PU
k 0
U
P3 l P2 P3
l
l
P2 P3 P0
U
l
Pk P0U k
k 0,1,2,3...
(1 U U 2 U 3 ...)
l
l
Pk Pk 1 Pk P0
Utilization Law
k
k 0
k
Pk l Pk 1
P0 (1 U U 2 U 3 ...)
Geometric series
3
k
0
1
1U
Performance Evaluation – Analytical Method (M/M/1)
Avg. # of IORB’s in the system
k
P
U
0 1
N k Pk k P0U k
k 0
k
k 0
k (1 U )U k
k 0
1
P0
1
1 U
Geometric series
P0 1 U
(1 U ) kU k
k 0
U (1 U ) kU k 1
k 0
k
U (1 U )
U
U k 0
U (1 U )
1
U (1 U )
U 1 U
U
1U
1
1 U 2
Performance Evaluation – Analytical Method M/M/1
Little’s Law
N lR
N
R
Response Time
R
l
N U 1
l 1 U l
l 1 1
1
1 U l (1 U )
1
1
l l
1
1
R
l
Performance Evaluation – Analytical Method M/M/1
Average waiting Time in queue
Wq R S
1
Wq R
use
R
W q
1
l
1
1
Wq
l
U
Wq
l
Average # of IORBs in queue
N q
N lR Little’s Law
Nq l W q
U
l
l
l
U
l
1
U2
N
1 U