Performance Tuning your application running in the Application
Server 10g can be difficult at best, and at the very least frustrating.
The issue is that the application server is made up of a lot of
components that all interact. Once you locate a bottle neck and
take action to relieve it, the bottle neck moves to another component.
Luckily all the application server components are instrumented to use a
tool called the Dynamic Monitoring Server (DMS) to report performance
data. You access this information when you use the Application
Server Control web site for the instance. A lot of the performance
statistics reported by Application Server Control is obtained from DMS.
Portal, OC4J, the OC4J Servlet Engine, Oracle HTTP Server are all
instrumented to report DMS statistics.
You can also instrument you own Java application running inside the OC4J
container to report custom statistics through the DMS API. Here is
a paper on OTN detailing the procedure:
You can access this information using a tool called dmstool.
Dmstool reports the data contained in the DMS Sensors. A Sensor
monitors some type of data. Some record time, count events, or
contain a state. To get a listing of what statistic are available
from dmstool use the -list command.
$ source portal.env
$ dmstool -list |wc -l
I piped the command to wc to count the number of lines returned.
My dmstool for the portal instance is reporting 6366 different
statistics. The key is to sort through the list of available
statistics and determine which one allow you to effectively monitor you
system. These statistics can then be stored in a database to
provide time based analysis.
We are big proponents of monitoring over time to determine a signature
for your server. This is important when problems arise because you
can quickly determine which component is outside of it's normal range
for that time.
Once you determine what to monitor you can script the data collection.
$ dmstool -i 60 -c 10 \ /host_name/Apache:14502:6004/Apache/request.completed \
Here I take 10 samples at 60 seconds of the Apache request sensor for
the completed operations. Here is a partial results.
Wed Oct 27 13:08:58 MDT 2004
Apache:14502:6004/Apache/request.completed 61058 ops
Wed Oct 27 13:09:03 MDT 2004
Apache:14502:6004/Apache/request.completed 61067 ops
Wed Oct 27 13:09:08 MDT 2004
Apache:14502:6004/Apache/request.completed 61083 ops
Wed Oct 27 13:09:13 MDT 2004
Apache:14502:6004/Apache/request.completed 61102 ops
Notice the the number of ops is growing. If my script was loading
this information into a database table I could query the data by time to
get a signature for this sensor. Kind of a STATSPACK for the
For a quick analysis I can drop this into Excel or Calc
spreadsheet and compute the difference, and create a graph showing the
data over time.
DMS is a powerful tool to help you understand how your application
server is responding. DMS statistics can also be accessed from
your Java application through the DMS API.
Note: If you create a STATSPACK for AS10g, recommend that you place
it in the back-end database rather than the metadata repository.
Get the Complete
Oracle SQL Tuning Information
The landmark book
SQL Tuning The Definitive Reference" is
filled with valuable information on Oracle SQL Tuning.
This book includes scripts and tools to hypercharge Oracle 11g
performance and you can
for 30% off directly from the publisher.