Database Reference
In-Depth Information
For each problem, the three questions shown in Figure 1-4 must be answered:
How Can Time Spent
Be Reduced?
Where Is Time Spent?
How Is Time Spent?
Figure 1-4. To troubleshoot a performance problem, you need to answer these three questions
Where is time spent? First, you have to identify where time goes. For example, if a specific
operation takes ten seconds, you have to find out which module or component most of
these ten seconds are used up in.
How is time spent? Once you know where the time goes, you have to find out how that time
is spent. For example, you may find out that the component spends 4.2 seconds on CPU,
0.4 seconds doing disk I/O operations, and 5.1 seconds waiting for dequeuing a message
coming from another component.
How can time spent be reduced? Finally, it is time to find out how the operation can
be made faster. To do so, it is essential to focus on the most time-consuming part of the
processing. For example, if disk I/O operations take 4% of the overall processing time, it
makes no sense to start optimizing them, even if they are very slow.
To find out where and how the time is spent, the analysis should start by collecting end-to-end performance
data about the execution of the operation you are concerned with. This is essential because multitier architectures
are currently the de facto standard in software development for applications needing a database like Oracle. In the
simplest cases, at least two tiers (a.k.a. client/server) are implemented. Most of the time, there are three: presentation,
logic, and data. Figure 1-5 shows a typical infrastructure used to deploy a web application. Frequently, for security or
workload-management purposes, components are spread over multiple machines as well.
Reverse
Proxy
Web
Server
Application
Server
Database
Server
Client
Storage
Figure 1-5. A typical web application consists of several components deployed on multiple systems
To be processed with a multitier infrastructure, requests may go through several components. However, not
in all situations are all components involved in the processing of a specific request. For example, if caching at the
web server level has been activated, a request may be served from the web server without being forwarded to the
application server. Of course, the same also applies to an application server or a database server.
Ideally, to fully analyze a performance problem, you should collect detailed information about all components
involved in the processing. In some situations, especially when many components are involved, it may be necessary
to collect huge amounts of data, which may require significant amounts of time for analysis. For this reason,
a divide-and-conquer approach is usually the only efficient 5 way to approach a problem. The idea is to start the
analysis by breaking up the end-to-end response time into its major components (see Figure 1-6 for an example)
and then to gather detailed information only when it makes sense. In other words, you should collect the minimum
amount of data necessary to identify the performance problem.
 
 
Search WWH ::




Custom Search