0

I am having to work on a poorly written, ten year old humongous web application, deployed on IBM Websphere. The problem is it takes forever (almost 40minutes) to start. I have used JVM monitor in the past to analyze a running application, and memory analyzer to analyze heap dumps, but I have never worked on startup issues like this.

Is there a way to profile/analyze the application while it is starting up, without making code changes? I searched SO and I found this post. I didn't quite get how to get VisualVM to work with a web application that has not yet started.

Can anyone help me here - is it possible to use VisuaVM or any other tool (preferably free) to monitor a web application that is starting up?

Community
  • 1
  • 1
Guru
  • 155
  • 10
  • 1
    Yes, if you use oracle JVM. If you use IBM JVM you can download the health center which can profile an application too. Follow the instructions to enable it. – Thorbjørn Ravn Andersen Jan 28 '14 at 21:34
  • Thanks for the great suggestion! I am using IBM JVM, and I was able to connect to the JVM as it starts using healthcenter. I am not yet sure if I am seeing all the data I want, but it connected to the JVM and its a good start. For some reason, the method trace is disabled. I need to find out how to get it working. Any input on this is greatly appreciated :) – Guru Jan 29 '14 at 15:55
  • Check the messages carefully. I needed to update a file locally for that. – Thorbjørn Ravn Andersen Jan 30 '14 at 07:04

1 Answers1

2

JvisualVM is a great tool. To monitor you application you should first start your container. After that, add your application to the container and start to profile and trace your application packages.

Here a tutorial.

http://visualvm.java.net/api-quickstart.html

Now, if you are using IBM tools, you should already have a licence for IBM Introscope (http://www-304.ibm.com/partnerworld/gsd/solutiondetails.do?solution=23517&expand=true)

It's focus on IBM Websphere. See if your company has it, and try it.

Also check this out

http://www.ibm.com/developerworks/java/jdk/tools/healthcenter/#download

Profile tool for IBM tools (including websphere). I think this could solve your problem. It's free and seems very close to jvisualVM.


Edited:

Another tool for profiling is new relic

http://newrelic.com/

I've seen some good reviews about it.

Eduardo Briguenti Vieira
  • 4,351
  • 3
  • 37
  • 49
  • would it work while the application is starting up? My problem is I want to look into the application startup issue, and I don't have a java process yet, for visualvm to monitor. I will look into the IntroScope, most likely we wont have a license for it. – Guru Jan 28 '14 at 22:01
  • But your container should be a thread on the monitor. The last time I use it, It was the Jboss container. And It is a thread in the JVisualVM monitor. Maybe for some reason Websphere isn't showing. Maybe needs a configuration. – Eduardo Briguenti Vieira Jan 28 '14 at 22:03