Solved

Java Tomcat eats a lot CPU!

Posted on 2014-12-22
1
242 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

Zoho SalesIQ

Hassle-free live chat software re-imagined for business growth. 2 users, always free.

Question has a verified solution.

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

It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
There are countless ways to use social media and often times businesses are not using it properly. Is your business making any social media mistakes? Here are some tips to get your foot in the door with social media and make the most of it for your …
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
The goal of the tutorial is to teach the user how to block contacts and manage the block contact list.

895 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now