 |
|
Oracle HTTP Server Performance
Tuning
Oracle Application Server Tips by Burleson
Consulting |
Since OHS is built on the proven
capabilities of the Apache web server, there are not many things you
can do to tune the actual server. OHS must be tuned as part of
the total application server. This is discussed in the High
Availability and Performance chapter. That said, there are a
number of things you can do to improve OHS performance.
Paging ? Anytime the operating
system has to page memory to swap there is performance
degradation. Virtual memory allows an OS to over allocate
physical memory, but it comes at a price. Constant swapping
of memory pages is a significant overhead. The only way to
stop excessive swapping is to reduce the memory footprint of the
application or increase the memory on the server.
Logging ? The more that must be
written in logs the more time is spent writing to files. One
way to reduce the load on OHS is to reduce the Logging Level.
Once the system is functioning properly, you may be able to reduce
the logging level.
Using .htaccess ? Directory
Containers are used in the httpd.conf file so that all
configuration is in one place. A disadvantage is that each
directory accessed requires that it?s access privliges be
determine along with the access privileges of all directories
above it. If each directory contains a .htaccess file and
all access privileges are stored there, then OHS only needs to
read that one file. The trade off is maintaining a .htaccess
file in each subdirectory vs. the overhead of determining access
privileges from Directory Containers in the httpd.conf file.
The more directories the system uses the more overhead of
determining access privileges if .htaccess files are not used.
KeepAlive ? ALWAYS SET TO ON!!!
This parameter allows multiple requests to be serviced on a single
connection. This reduces the overhead of creating and
dropping network connections. This can have a significant impact
on OHS performance.
OHS Load ? The Enterprise Manager
web console provides a large range of performance/load metrics.
Monitoring these metrics can help you determine the load your
application places on OHS. You must remember to monitor
during appropriate times to insure that you are gathering
appropriate statistics. Web server usage fluctuates
continuously, depending on work schedules, time of day, or the day
of the week. You must insure that you are gathering
statistics to account for these variances.
Also remember that some metrics reported are
for the entire application server. Throughput and response
time will include actions performed by other parts of the
application sever and possibly an interaction with a database.
Monitoring the Oracle HTTP Server with
Enterprise Manager
Oracle provides a web-based interface to
monitor all parts of the Application Server, including OHS. To
access this interface, insure that Enterprise Manager (EM) is
running and if not, you will need to start it.
$ORACLE_HOME/bin/emctl
status em
$ORACLE_HOME/bin/emctl start em
Open a web browser, connect to the
application server (http://server_domain_name:port), log onto
Enterprise Manager, and navigate to the instance page. The OHS
is designated HTTP_Server in the system components list.
Figure 1: Enterprise Manager Instance Page
If there is a need to start/stop/restart OHS,
select the check box next to HTTP_Server, select the appropriate
button, and EM will execute the command. When you make changes to
the HTTP_Server, EM will write the change to the httpd.conf file and
restart the OHS. To get OHS details, select the HTTP_Server
link to get the HTTP_Server page.
Figure 2: Enterprise Manager HTTP_Server
Page
The data on this page is a snaphot of OHS
performance at the time the page was loaded. The data is not
updated unless you refresh the page. Many of the directives
set in httpd.conf can be verified and changed from this and
subsequent pages, to include creating Virtual Hosts and looking at
logs. Selecting Create in the Virtual Host section will walk
you through a setup wizard (detailed at the end of this section).
The Administration Section contains all the
directives from httpd.conf. Selecting Server Properties in the
Administration section will take you to the directives in the first
section of httpd.conf.
Figure 3: Enterprise Manager Server
Properties Page
All changes made in EM are written back to
the httpd.conf file and OHS is restarted to load the new parameters.
All of the directives in httpd.conf can be found in the
Administration section of the HTTP_Server page.
Now that we can use EM to maintain OHS, lets
look at some of the metrics that we can use to monitor OHS?s
performance. Start at the HTTP_Server page (Figure 2 above) and
select the Status Metrics link.
Figure 4: Enterprise Manager
HTTP_Server Status Metrics Page
This is an excerpt from "Oracle
10g Application Server Administration Handbook" by Don Burleson
and John Garmany.