Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Java Tomcat eats a lot CPU!

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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

Suggested Solutions

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é.
Find out how to use dynamic social media in email signatures with this top 10 DOs & DON’Ts.
Viewers will learn how to use the Hootsuite Dashboard.
Video by: syed
The goal of the tutorial is to teach the what Skype is and how to use it.

856 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