Solved

Java Tomcat eats a lot CPU!

Posted on 2014-12-22
1
227 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
Comment Utility
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Currently, it's non-trivial for users to draw the attention of a particular Expert. Let's make it easier for them! You can set up a Saved Search with email notification so that you receive an email when a user mentions your name in their question…
I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
The goal of the tutorial is to teach the user how to how to add contacts and edit them in Skype.
The goal of the tutorial is to teach the user how download Skype and make an account and set it up. This tutorial will be in three parts.

771 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

9 Experts available now in Live!

Get 1:1 Help Now