It's not a secret anymore!
The moose likes Performance and the fly likes Question about performance analyzing with jConsole Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Performance
Bookmark "Question about performance analyzing with jConsole" Watch "Question about performance analyzing with jConsole" New topic

Question about performance analyzing with jConsole

Justin Allen

Joined: Feb 02, 2011
Posts: 18

hello ranchers, I have a performance question about a web application that I've recently started working on. The codebase for this app is on the larger side, for me anyway, 450 java files and has been around for about 2 years. We use struts1 and tomcat. Here is a jconsole screen shot for the past day and a half or so. Now the million dollar question that's gotten me head scratching.

I can see during the day we get spikes in memory and threads, but even in the dead of night our processor seems to be constantly pegged. I'm not sure what type of horsepower we have on the box itself but is that where I should start looking or should I start looking at our processing code? I know this is very vague and there are lots of things that need to be fixed in our code but I was hoping to get a general impression based on the image.


[Thumbnail for 8-3-2011 11-25-05 AM.png]

Rishi Shehrawat
Ranch Hand

Joined: Aug 11, 2010
Posts: 218

You need to find out what is being done on the box.
1.) You can start with taking a thread dump, this will tell you what is being executed within the JVM. Jconsole can be used to take thread dumps. You need to see if any of the threads are doing any processing.
2.) Need to look at GC activity. What is your heap size. This can be done by enabling GC logs. Interestingly the heap size is constant during peak & off peak.
3.) Do you have any off peak batch jobs, etc.
4.) Any scheduled maintenance like backups that are done on the box during off peak hours?
I agree. Here's the link:
subject: Question about performance analyzing with jConsole
It's not a secret anymore!