You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Andy Akins <an...@tennesseeanytime.org> on 2003/04/23 23:45:28 UTC

Performance problem on Solaris 9

Hello all,

We have recently installed an  Apache + Tomcat setup in our production
environment. Our both our tomcat servers, the idle time is hovering aroung
0%, with java usually having above 85%-90% usage. We've done some research
in books and on the web (using google), and have done some tweaking, but
have had little luck improving our performance. Here are some of our
details:

2x Sun Ultra 10s (1 processor, 512MB ram each) running Solaris 9, Apache
1.3.27 and mod_jk, connecting to

2x Sun 220s (1 processor, 1GB ram each) running Solaris 9, Sun Java 1.4.1
and Tomcat 4.1.18.

The JAVA_OPTS are set at -server -Xms512m -Xmx512m -Xincgc

I've included some configuration files below.

If anyone on the list can either offer advice, or point us in the direction
of some useful tips or suggestions, we'd appreciate it.

Thanks,

  Andy Akins
  Director of Development
  TennesseeAnytime
  The Official Website for the State of Tennessee


The relevant entries in httpd.conf are:
  
LoadModule jk_module libexec/mod_jk.so
JkWorkersFile conf/mod_jk.properties
JkLogFile logs/mod_jk
JkLogLevel error
JkMount /servlets loadbalancer
JkMount /servlets/* loadbalancer
JkMount /servlet loadbalancer
JkMount /servlet/* loadbalancer
JkMount /privtx loadbalancer
JkMount /privtx/* loadbalancer
JkMount /examples loadbalancer
JkMount /examples/* loadbalancer
JkMount /tnjobs loadbalancer
JkMount /tnjobs/* loadbalancer
JkMount /agrso loadbalancer
JkMount /agrso/* loadbalancer
JkMount /imvr loadbalancer
JkMount /imvr/* loadbalancer
JkMount /foil loadbalancer
JkMount /foil/* loadbalancer
JkMount /etax loadbalancer
JkMount /etax/* loadbalancer
JkMount /labor loadbalancer
JkMount /labor/* loadbalancer
JkMount /parks loadbalancer
JkMount /parks/* loadbalancer
JkMount /abc loadbalancer
JkMount /abc/* loadbalancer
JkMount /cslr loadbalancer
JkMount /cslr/* loadbalancer
JkMount /hlrs loadbalancer
JkMount /hlrs/* loadbalancer
JkMount /ivtr loadbalancer
JkMount /ivtr/* loadbalancer
JkMount /lgip loadbalancer
JkMount /lgip/* loadbalancer
JkMount /mytn loadbalancer
JkMount /mytn/* loadbalancer
JkMount /privtx loadbalancer
JkMount /privtx/* loadbalancer
JkMount /redirt loadbalancer
JkMount /redirt/* loadbalancer
JkMount /sales loadbalancer
JkMount /sales/* loadbalancer
JkMount /smvr loadbalancer
JkMount /smvr/* loadbalancer
JkMount /soscorp loadbalancer
JkMount /soscorp/* loadbalancer
JkMount /sosname loadbalancer
JkMount /sosname/* loadbalancer
JkMount /tcses loadbalancer
JkMount /tcses/* loadbalancer
JkMount /tncr loadbalancer
JkMount /tncr/* loadbalancer
JkMount /tndlr loadbalancer
JkMount /tndlr/* loadbalancer
JkMount /unclp loadbalancer
JkMount /unclp/* loadbalancer

The mod_jk.properties file has:

workers.tomcat_home=/opt/tomcat
workers.java_home=/usr/java
#worker.list=ajp13
#worker.ajp13.port=8009
#worker.ajp13.host=prodapp3.tennesseeanytime.org
#worker.ajp13.type=ajp13

worker.list=tomcat1, tomcat3, loadbalancer

worker.tomcat1.port=8009
worker.tomcat1.host=prodapp1.tennesseeanytime.org
worker.tomcat1.type=ajp13
worker.tomcat1.lbfactor=100

worker.tomcat3.port=8009
worker.tomcat3.host=prodapp3.tennesseeanytime.org
worker.tomcat3.type=ajp13
worker.tomcat3.lbfactor=100

worker.loadbalancer.type=lb
worker.loadbalancer.balanced_workers=tomcat1,tomcat3

And here's our server.xml:

<Server port="8005" shutdown="SHUTDOWN" debug="0">


  <!-- Comment these entries out to disable JMX MBeans support -->
  <!-- You may also configure custom components (e.g. Valves/Realms) by
       including your own mbean-descriptor file(s), and setting the
       "descriptors" attribute to point to a ';' seperated list of paths
       (in the ClassLoader sense) of files to add to the default list.
       e.g. descriptors="/com/myfirm/mypackage/mbean-descriptor.xml"
  -->
  <Listener className="org.apache.catalina.mbeans.ServerLifecycleListener"
            debug="0"/>
  <Listener
className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener"
            debug="0"/>

  <!-- Global JNDI resources -->
  <GlobalNamingResources>

    <!-- Test entry for demonstration purposes -->
    <Environment name="simpleValue" type="java.lang.Integer" value="30"/>

    <!-- Editable user database that can also be used by
         UserDatabaseRealm to authenticate users -->
    <Resource name="UserDatabase" auth="Container"
              type="org.apache.catalina.UserDatabase"
       description="User database that can be updated and saved">
    </Resource>
    <ResourceParams name="UserDatabase">
      <parameter>
        <name>factory</name>
        <value>org.apache.catalina.users.MemoryUserDatabaseFactory</value>
      </parameter>
      <parameter>
        <name>pathname</name>
        <value>conf/tomcat-users.xml</value>
      </parameter>
    </ResourceParams>
  </GlobalNamingResources>

  <!-- Define the Tomcat Stand-Alone Service -->
  <Service name="Tomcat-Standalone">

    <!-- Define a non-SSL Coyote HTTP/1.1 Connector on port 8080 -->
    <Connector className="org.apache.coyote.tomcat4.CoyoteConnector"
               port="8080" minProcessors="5" maxProcessors="500"
               enableLookups="false" redirectPort="8443"
               acceptCount="100" debug="0" connectionTimeout="20000"
               useURIValidationHack="false" disableUploadTimeout="true" />

    <!-- Define a Coyote/JK2 AJP 1.3 Connector on port 8009 -->
    <Connector className="org.apache.coyote.tomcat4.CoyoteConnector"
               port="8009" minProcessors="5" maxProcessors="500"
               enableLookups="false" redirectPort="8443"
               acceptCount="100" debug="0" connectionTimeout="0"
               useURIValidationHack="false"
 
protocolHandlerClassName="org.apache.jk.server.JkCoyoteHandler"/>
    <!-- Define the top level container in our container hierarchy -->
    <Engine jvmRoute="tomcat3" name="Standalone" defaultHost="localhost"
debug="0">

      <!-- Global logger unless overridden at lower levels -->
      <Logger className="org.apache.catalina.logger.FileLogger"
              prefix="catalina_log." suffix=".txt"
              timestamp="true"/>

      <!-- This Realm uses the UserDatabase configured in the global JNDI
           resources under the key "UserDatabase".  Any edits
           that are performed against this UserDatabase are immediately
           available for use by the Realm.  -->
      <Realm className="org.apache.catalina.realm.UserDatabaseRealm"
                 debug="0" resourceName="UserDatabase"/>

      <!-- Define the default virtual host -->
      <Host name="localhost" debug="0" appBase="webapps"
       unpackWARs="true" autoDeploy="true">

        <!-- Logger shared by all Contexts related to this virtual host.  By
             default (when using FileLogger), log files are created in the
"logs"
             directory relative to $CATALINA_HOME.  If you wish, you can
specify             a different directory with the "directory" attribute.
Specify either a
             relative (to $CATALINA_HOME) or absolute path to the desired
             directory.-->
        <Logger className="org.apache.catalina.logger.FileLogger"
                 directory="logs"  prefix="localhost_log." suffix=".txt"
                timestamp="true"/>

        <!-- Tomcat Root Context -->
        <Context path="" docBase="ROOT" debug="0"/>

      </Host>

    </Engine>

  </Service>

</Server>

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org