[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

High CPU Usage by Tomcat

Posted on 2014-04-11
4
Medium Priority
?
4,200 Views
Last Modified: 2014-04-25
Our developer team had just updated a link within our webpage that gives our clients a new look and feel to our webpage. As a sysadmin, I helped with the deploying the jsp.war file (build) to the server. Now, the CPU usage for tomcat has maxed out to 99-100%. Of course restarting the service will bring it down, but eventually it will max out again. The development team has looked at the logs, and cannot pin point what the issue is.  I don't know java, or tomcat at all, but my colleague does, and have add more memory to the permgen, java and we've even added more physical memory and CPU, but to no avail. The developers looked at the codes and find nothing wrong. What is odd is that this high CPU spike has something to do with the change from the developers because it happened right after the update. However, we do not want to point fingers, nor do they. I looked at anything possible from a Windows server standpoint. Again, I am not a java expert or a developer, but can someone here who is provide some sort of theory as to what it can possibly be or provide some advice so i can pass that info to our developers? We use VisualVM to looked for any issues, and already had our DBA look at it from a DB perspective, but still to no avail. The application we use is inhouse (proprietary).
0
Comment
Question by:5itface
[X]
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
4 Comments
 
LVL 3

Expert Comment

by:aces4all00
ID: 39995471
Nothing wrong doesn't necessarily mean the code is optimal for the platform it's running on.  Some questions that need to be asked are:

1.  What's the target OS?
2.  What OS specific setting are required or recommended to get best performance out of the application?
3.  What are the hardware requirements/recommendations for the application (processor, storage, memory, and network)?
4.  What web server (Tomcat in this case) version is required and are  specific settings required or recommended to get best performance out of the application?
5.  How many users (sessions) will the application support using the recommended hardware, OS, and web server configurations?
6.  What members of the development, systems administration, and database administration teams will be responsible for addressing any issues?

As you get more experience you'll likely have a number of other questions that need to be answered before putting a new application into production but I'd recommend using these as a minimum.

But that's for future applications.  Right now you're stuck with having a poorly performing one in production.  You're very right about not pointing fingers as it's not likely to get you anywhere.  Instead I ask something like, "Who can I work with on the development team to help find out what's going on?"  

As to what's happening there's just too many possibilities to guess but if I had to I'd start by looking at refresh intervals for any active content (particularly calculated data and data driven visual content - graphs, charts, etc.).  In your place I'd start by trying to get the development team to share responsibility for finding a solution and getting answers to the above questions.

Good luck.
0
 
LVL 28

Assisted Solution

by:dpearson
dpearson earned 500 total points
ID: 39995476
We use VisualVM to looked for any issues...

What did VisualVM show?  It should be able to indicate where the 100% CPU usage is going (i.e. which methods are causing the CPU load) and then you would need to decide whether that's appropriate behavior or not.

Profiling tools like this are definitely the way to go as that's exactly what they're designed to help solve - figuring out where the cycles are being spent in an app.

BTW since it came after an update it's 99% likely to be an issue introduced by the development team - just some unexpected situation that has come up in production that wasn't anticipated.  But the profiler should be able to identify what is using the CPU.
0
 

Author Comment

by:5itface
ID: 39997024
The CPU is consumed by the Tomcat process.
0
 
LVL 16

Accepted Solution

by:
Valeri earned 500 total points
ID: 39998555
it looks like there are blocked threads. There is a piece of code which is not synchronized.
make thread dumbs and check for blocked threaqds.
this can help you: http://middlewaremagic.com/weblogic/?p=2281
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
Suggested Courses

649 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