Professional Documents
Culture Documents
Arriving requests
Server
Completed requests
N
Q
Utilization
Ui
Wait time
Wi
Response time
Ri
'
Residence
time
R
i
Ni
(1)
(2)
Ui = X0 x Di.
(3)
With the service demand Di and utilization Ui given,
'
Ri' = Vi x Ri = Di / (1 Ui),
(4)
R0 = i =1 Ri' . (7)
K
Application
Server
Storage
DBServer
Its clear from both Eqs. (12) and (13) that the efforts
of optimizing the performance of an enterprise
software application essentially fall into two categories:
1. Minimize wait times at each layer as much as
possible
2. Reduce service demands at each layer as
much as possible
Actual performance optimization efforts start with
identifying bottlenecks. A resource is a bottleneck if it
has the largest sum of wait time and service demand,
as is implied in Eqs. (12) and (13). When the
bottleneck with a resource is removed, then the next
bottleneck is identified and removed until a balance is
reached among all resources. Removing bottlenecks
one after another will lead to a balanced queuing
system that will be detailed later in this paper.
Characteristically, bottlenecks are implied when the
type of the application is known, as is shown in the
following table. As enterprise applications incur
intensive I/O activities and heavy validation logic,
either I/O or CPU could be the bottleneck.
R0 = Vi x Wi + Di ,
i
(12)
X0 =
V x W + D
i
. (13)
i
Di = Vi x Si,
50
40
60
40
20
API #1
API #2
before
21
92
after
13
30
20
10
0
80
Throughput (Records / s)
100
10
20
30
40
50
100
batch 1
16
33
36
36
38
41
45
bacth 2
13
24
28
30
31
33
31
batch size
API #1
API #2
before
46
42
after
5.8
10
1.8
1.6
Performance Gain
1.4
1.2
1
0.8
0.6
0.4
0.2
0
base
ap
Batch A
Batch B
1.65
1.2
SAN
201,800
400
0.21
124,700
250
12,000
0.12
180
160
140
120
100
80
60
40
20
0
SQL1
SQL2
RegularIndex
164
101
DataInIndex
42
24
C1=<value>
and
C1=<value>
and
by
the
2.5
Normalized throughput
1.5
0.5
0
throughput
EXACT
SIMILAR
FORCE
2.3
Throughput
42
27
90
DB
App
Tuning on off
DB
App
DB
App
Fig. 11 An unbalanced system with bifurcating CPU
utilizations of the application server (blue curve) and
the database server (yellow curve)
Fig. 12 shows a constant CPU ratio between the
application server and the database server with
exactly the same workload, after some tuning was
applied. At the end of the test run, the throughput was
107, which was 73% better than System A. To some
extent, a balanced system means a stable system, as
is demonstrated with this test.
6. Conclusions
In this paper, we introduced the basics of queuing
theory. We demonstrated the applicability of queuing
theory to optimizing the performance of enterprise
software applications. We presented a number of
optimization techniques that resulted in immediate
performance improvements when applied.
We also proposed a new definition for balanced
systems using utilizations instead of service demands.
The two definitions are equivalent to each other, but
the new definition makes more sense as utilizations
can be measured and monitored more easily.
Based on the new definition for balanced systems, we
derived a performance optimization guideline which
states that an enterprise software application performs
better if its a balanced system. This has turned out to
be a very useful guide for optimizing and tuning the
performance of enterprise software applications both
under development and after deployment. Future
research will help clarify more on this guide.
Acknowledgement
Id like to thank Dr. Timothy Harris for discussions and
reviewing this paper.
References
[WEB01]http://en.wikipedia.org/wiki/Premature_optimi
zation.
[LITT61] J. D. C. Little, A Proof for the Queuing
Formula: L = W, Operations Research, 9(3), 1961.
[JACK63] J. R. Jackson, Jobshop-like Queuing
Systems, Management Science, 10(1), 1963.
[LAZO84] E. D. Lazowska et. al., Quantitative System
Performance: Computer System Analysis Using
Queuing Network Models, Prentice-Hall, Inc., 1984.
[JAIN91] R. Jain, The Art of Computer Systems
Performance Analysis, John Wiley & Sons, Inc., 1991.
[HARR93] P.G. Harrison et. al., Performance
Modeling of Communications Networks and Computer
Architectures, Wokingham, U.K.: Addison-Wesley.
[GUNT98] N. Gunther, The Practical Performance
Analyst, McGraw-Hill, 1998.
[SIMI03] H. Simitci, Storage Network Performance
Analysis, Wiley, 2003.
[MENA00] D. A. Menasce and V. A. F. Almeida,
Scaling for E-Business, Prentice Hall PTR, 2000.
[MENA04] D. A. Menasce et. al., Performance by
Design, Prentice Hall, 2004.
[LIU04] H. Liu and P. Crain, An Analytic Model for
Predicting the Performance of SOA-based Enterprise
Software Applications, CMG Proceedings, Dec. 2004,
Las Vegas, Vol. 2, pp.821 832.
[LIU05] H. Liu, Service Demand Models for
Enterprise Software Applications, CMG Proceedings,
Dec. 2005, Orlando, Florida.
[KEND81] D.G. Kendall, J. Royal Stat. Soc. Series
B13, pp. 151-185, 1981.
[REIS80] M. Reiser and S. S. Lavenberg, MeanValue Analysis of Closed Multichain Queuing
Networks, J. of the ACM, 27 (2) pp313-322, 1980.
[HARR01] Guy Harrison, Oracle SQL HighPerformance Tuning, Prentice Hall PTR, 2001.
[TOW03] D.Tow, SQL Tuning, OReily & Associates,
Inc., 2003.
[SMIT02] C. Smith and L. Williams, Performance
Solutions A Practical Guide to Creating Responsive,
Scalable Software, Addison Wesley, 2002.
[BONA01] E. Bonazzi and G. Stokol, Oracle 8i &
Java, From Client/Server to E-Commerce, Prentice
Hall PTR, 2001.