?? lib0122.html
字號:
<html>
<META http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<head>
<title>Chapter 19: Performance Tuning and Load Testing</title>
<link rel="STYLESHEET" type="text/css" href="images/xpolecat.css">
<link rel="STYLESHEET" type="text/css" href="images/ie.content.css">
</head>
<body>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr><td><div STYLE="MARGIN-LEFT: 0.15in;"><a href="toc.html"><img src="images/teamlib.gif" width="62" height="15" border="0" align="absmiddle" alt="Team LiB"></a></div></td>
<td align="right"><div STYLE="MARGIN-LEFT: 0.15in;">
<a href="LiB0121.html"><img src="images/previous.gif" width="62" height="15" border="0" align="absmiddle" alt="Previous Section"></a>
<a href="LiB0123.html"><img src="images/next.gif" width="41" height="15" border="0" align="absmiddle" alt="Next Section"></a>
</div></td></tr></table>
<br>
<div class="chapter">
<a name="ch19"></a>
<h1 class="chapter-title"><span class="chapter-titlelabel">Chapter 19: </span>Performance Tuning and Load Testing</h1><div class="section">
<h2 class="sect2-title">
<a name="597"></a>Overview</h2>
<a name="598"></a><a name="IDX-251"></a>
<div class="highlights">
<p class="first-para">Management often looks to the technical architect to lead performance-tuning efforts. This chapter provides tips and tricks you can use to tune and load test your J2EE applications. In fact, you can use many of the concepts presented here for other types of applications as well.</p>
<p class="para">
<b class="bold">Establish performance and scalability targets.</b> This is the first step in performance tuning and load testing. Without targets, you'll never know when those tasks have finished.</p>
<p class="para">Although there are always opportunities for performance improvement, performance tuning has diminishing returns over time. When you start tuning, the changes you make will result in larger performance improvements. But over time, your improvements will get smaller and smaller with most applications. Because most of the benefit you get from tuning will occur in the first 20 percent of the work, the 80/20 rule applies once again.</p>
<p class="para">
<b class="bold">Don't start tuning until after the application is in testing.</b> Many developers have a desire to tune every piece of code they write. I admire their desire for completeness, but it hurts the timeline of the project. Chances are high that a good percentage of the code being tuned at this level will not result in good performance enhancement to the application as a whole. Although I've meet many developers that are not comfortable with this concept, <a name="599"></a><a name="IDX-252"></a>experience has taught me that at some places in the application, the cost of tuning doesn't reap enough benefit for anyone to care about.</p>
<p class="para">
<b class="bold">Most performance problems originate in application code.</b> Developers tend to ferret out performance problems by examining container configurations, JVM options, operating system performance, network performance, and the like rather than looking at code. This is usually wishful thinking on the part of developers.</p>
<p class="para">
<b class="bold">Measure performance before tuning to establish a baseline.</b> The <a href="LiB0123.html#600" target="_parent" class="chapterjump">next section</a> discusses how to measure performance. The numbers that result from performance measuring will be the basis for judging the effectiveness of performance improvements.</p>
<p class="last-para">Performance tuning is an extensive subject. I can only scratch the surface here. <a href="LiB0125.html#627" target="_parent" class="chapterjump">Joines, Willenborg, and Hygh (2002)</a> is a good comprehensive reference for performance tuning J2EE applications. I find the numerous tips in <a href="LiB0125.html#626" target="_parent" class="chapterjump">Bulka (2000)</a> incredibly useful for improving performance after I've identified a problem.</p>
</div>
</div>
</div><br>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr><td><div STYLE="MARGIN-LEFT: 0.15in;"><a href="toc.html"><img src="images/teamlib.gif" width="62" height="15" border="0" align="absmiddle" alt="Team LiB"></a></div></td>
<td align="right"><div STYLE="MARGIN-LEFT: 0.15in;">
<a href="LiB0121.html"><img src="images/previous.gif" width="62" height="15" border="0" align="absmiddle" alt="Previous Section"></a>
<a href="LiB0123.html"><img src="images/next.gif" width="41" height="15" border="0" align="absmiddle" alt="Next Section"></a>
</div></td></tr></table>
</body></html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -