My Favorites

Close

Please to see your favorites.


Tomcat Running in High Utilization on SLES 11

This document (7010072) is provided subject to the disclaimer at the end of this document.

Environment


SUSE Linux Enterprise Server 11
SUSE Linux Enterprise Server 11 Service Pack 1
SUSE Linux Enterprise Server 11 Service Pack 2

Situation

Java and tomcat running with high CPU utilization on SLES11.  

Running the top command shows a user 'tomcat' running a java process that runs at nearly 100%, almost all the time.

Resolution

NOTE: This document discusses SLES, not OES, which uses a different instance of tomcat.  Run the command ps -ef | grep tomcat.  If the command returns wwwrun as the owner, you're likely running either the version of tomcat that shipped with the SDK (not supported) or the server is running OES11.

In large part this is a known issue documented in the release notes: http://www.novell.com/linux/releasenotes/x86_64/SUSE-SLES/11-SP1/#known_performancet .  However, there are some additional items that should be checked.
1.)  Does tomcat6 start at startup?  Enter the command chkconfig, and look for tomcat6 in the list.  If it is sent to 'no' make sure that there is no novell-tomcat6 in the list, or if there is, that it is set to no, then run this:

chkconfig tomcat6 on

restart the server, then test to see if Tomcat hogs the CPU utilization.  If it does, continue. If the problem has gone away with this step, stop here.

2.)  Edit the /etc/tomcat6/tomcat6.conf file and look for this section:

# You can pass some parameters to java here if you wish to
#JAVA_OPTS="-Xminf0.1 -Xmaxf0.3"
# Use JAVA_OPTS to set java.library.path for libtcnative.so
JAVA_OPTS="-Djava.library.path=/usr/lib:/usr/lib64"

Make sure that the JAVA_OPTS line includes the /usr/lib and /usr/lib64 entries listed above.

3.) Edit /etc/sysconfig/tomcat6 and add "-Xthr:minimizeUserCPU to the CATALINA_OPTS line at the bottom of the file as such:

CATALINA_OPTS="-Xthr:minimizeUserCPU -Xms800m -Xmx900m"

Restart tomcat by running rctomcat6 restart, then test the top command.  If the utilization is still high, it may be useful to just run a small java process a couple of times as this may clean out the java stack, with this command:

time java -Xmx64m -version

Check top again and verify whether or not the memory utilization has dropped.  (NOTE: If the java -version command has been run a couple of times and memory utilization is still high, keep working through this document)

4.) Finally, if the above steps have NOT resolved the problem run the following:

rctomcat6 stop
echo "1"> /proc/sys/kernel/sched_compat_yield
rctomcat6 start
top

Confirm the status of the java process....has the cpu utilization dropped?  If it's still high, run the: time java -Xmx64m -version command once or twice and check top again.  If the status is still high, contact Novell Technical Services. Otherwise, at this point, reboot the server and verify that the CPU utilization of tomcat stays at a manageable level.



Disclaimer

This Support Knowledgebase provides a valuable tool for NetIQ/Novell/SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.

  • Document ID:7010072
  • Creation Date:27-JAN-12
  • Modified Date:30-APR-12
    • SUSESUSE Linux Enterprise Server
      SUSE Linux Enterprise Software Development Kit

Did this document solve your problem? Provide Feedback