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.
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?