Oracle Audio Technologies A86828-01 Server User Manual


 
Optimizing Servlet Performance
5-4 Oracle HTTP Server powered by Apache Performance Guide
parameters to false, since there is a performance cost in checking the repositories on
every execution of a servlet. Change these parameters in the zone properties file:
autoreload.classes=false
autoreload.file=false
Load Balancing
It is often beneficial to spread the servlet application load among multiple JServ
processes, especially when the application is run on a multiprocessor or if the
servlets and HTTP server are run on separate nodes. Running multiple Apache
JServ processes generally results in higher throughput and shorter response time,
even on a single-processor host. (See Chapter 3, "Sizing and Configuration" for
specific recommendations.)
This section explains how
to balance incoming requests between two JServ
processes running on the same host as the HTTP server. Examples from the
jserv.properties files are included with the procedures; substitute your own port
numbers and directory locations where needed.
If you use load balancing, you must start and stop processes manually, because
JServ cannot automatically start and stop more than one JServ process. (Sample
scripts for starting and stopping the JServ processes and the Oracle HTTP Server are
included in the $ORACLE_HOME/Apache/Apache/bin/ directory.) This means
that if a process terminates for any reason, JServ will not restart it.
To prevent
processes from terminating due to memory shortage, ensure that you have a
sufficient maximum heap size set for your JServ processes. See "Determining Java
Heap Size" on page 3-4.
Configuring the JServ processes
Each JServ process in your load balancing scheme must be configured to listen on
its own port and to log to its own file. If you have a jserv.properties file containing
the parameters needed to run your application, you can duplicate it to create a
properties file for each JServ process.
1. Create a properties file for each JServ process.
prompt>cp jserv.properties jserv1.properties
prompt>cp jserv.properties jserv2.properties
2.
Edit jserv1.properties as follows:
port=8001
log.file=/usr/local/jserv/logs/jserv1.log