Solved

Java Tomcat eats a lot CPU!

Posted on 2014-12-22
1
259 Views
Last Modified: 2014-12-31
Hi All,

I have 02 servers running Tomcat, with each server: 04 x CPUs, 16GBRAM, 300GB HDD.

OS: CentOS 6.6 and Flatform using: Liferay

Parameters for configure files:

1. [root@tcs1 ~]# more /usr/tomcat/apache-tomcat-7.0.42/bin/setenv.sh
AVA_OPTS="$JAVA_OPTS -Dfile.encoding=UTF8 -Dorg.apache.catalina.loader.WebappClassLoader.ENABLE_CLEAR_REFERENCES=false -Duser.timezone=Asia/Saigon -server -d64 -XX:NewSize=1g -XX:MaxNewSize=1g -Xms5g
-Xmx5g -XX:PermSize=1536m -XX:MaxPermSize=1536m -XX:SurvivorRatio=20 -XX:TargetSurvivorRatio=90 -XX:MaxTenuringThreshold=15 -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:ParallelGCThreads=4 -XX:Reserved
CodeCacheSize=512m -XX:+CMSParallelRemarkEnabled -XX:+CMSCompactWhenClearAllSoftRefs -XX:CMSInitiatingOccupancyFraction=85 -XX:+CMSScavengeBeforeRemark -XX:+CMSConcurrentMTEnabled -XX:+BindGCTaskThread
sToCPUs -XX:+UseFastAccessorMethods -XX:ParallelCMSThreads=1 -XX:+UseCompressedOops -XX:+DisableExplicitGC -XX:-UseBiasedLocking -Djava.net.preferIPv4Stack=true -XX:+UseLargePages"

2. /usr/tomcat/apache-tomcat-7.0.42/conf/server.xml
......
......
 <Connector executor="tomcatThreadPool"
               port="8080" protocol="HTTP/1.1"
               connectionTimeout="20000"
               redirectPort="8443" />
......
......

CPU can eat ~30% with connections connect to the Tomcat Server (~5 connections) & grow up rapidly 90% with 30-50 CCU.

Please give me some advices for troubleshooting issues above and how to solve this problem.

Thks in advance.
0
Comment
Question by:ldvhai
1 Comment
 
LVL 23

Accepted Solution

by:
Michael74 earned 500 total points
ID: 40514316
This probably caused by one of the sites you have running. Have a look at this similar question

http://www.experts-exchange.com/Programming/Languages/Java/Q_28410915.html

You can use MiddlewareMagic to diagnose the problem
http://middlewaremagic.com/weblogic/?p=2281
0

Featured Post

Guide to Performance: Optimization & Monitoring

Nowadays, monitoring is a mixture of tools, systems, and codes—making it a very complex process. And with this complexity, comes variables for failure. Get DZone’s new Guide to Performance to learn how to proactively find these variables and solve them before a disruption occurs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
The goal of the tutorial is to teach the user how to block contacts and manage the block contact list.

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question