All 2 entries tagged JBoss

View all 3 entries tagged JBoss on Warwick Blogs | View entries tagged JBoss at Technorati | There are no images tagged JBoss on this blog

November 24, 2005

Remote VisualGC for JBoss

Follow-up to Garbage collection and Hibernate performance tuning from Kieran's blog

We've recently upgraded the BlogBuilder server to Java 5 and JBoss 3.2.7. I was hoping that this would cure some of my garbage collection (GC) problems, but sadly it has not. I am still getting some very long blocking 20–30 second full GCs.

My backup plan was that if just the upgrade didn't fix things, then at least I could finally use the new remote monitoring tools that come with Java 5.

VisualGC is a tool that lets you visualise what is going on in a Java processes GC. As mentioned in my previous article, you can do some analysis by looking at and analysing the log files that you can get out about GC, but they don't really show quite whats going on. VisualGC will give you something like this:

This is easy to get to work on your local machine as you just follow the instructions here

The remote stuff is slightly trickier as you'll have to run an RMI Registry on the remote machine and also the jstatd program that helps generate the statistics about the process.

You'll need to get over a few permissions issues. Create a file called jstatd.all.policy in the directory where you want to run jstatd containing the below code:

grant codebase "file:${java.home}/../lib/tools.jar" {
permission java.security.AllPermission;
};
Make sure that the rmiregistry and jstatd are running as a user who has permission to see into the processes that you want to monitor.
rmiregistry 2020&
jstatd -J-Djava.security.policy=jstatd.all.policy -p 2020&

Importantly you have to specify a port, I am using 2020 here, but you can use any port that isn't in use. The reason is that the default port is 1099 and that will usually be used by your JBoss install. If you are getting access denied errors when trying to run jstatd, there is probably something wrong with your policy file. If you get a ClassNotFoundException for the sun.jvmstat.monitor.remote.RemoteHost class, then you probably have a problem with Java versions or paths.

Once these two processes are running, you should be able to hook into an monitor your remote process like this:

visualgc pid@host:2020
Good luck!

November 18, 2005

JBoss tuning and sliming

Writing about web page http://wiki.jboss.org/wiki/Wiki.jsp?page=JBossASTuningSliming

I came across this JBoss tuning and sliming page on the JBoss wiki a while back, but never really tried it out very much. I was forced to upgrade my JBoss from 3.2.6 to 3.2.7 today so that I can use the new Java 5 monitoring console so I thought I'd give it a go.

By taking out a load of stuff that I just don't need I managed these results:

Before:

  • Clean startup with no webapps deployed: 15s
  • Startup with BlogBuilder deployed: 34s

After:

  • Clean startup with no webapps deployed: 8s
  • Startup with BlogBuilder deployed: 27s

Try it out, it's worth a look.


April 2020

Mo Tu We Th Fr Sa Su
Mar |  Today  |
      1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30         

Tags

Search this blog

Most recent comments

  • One thing that was glossed over is that if you use Spring, there is a filter you can put in your XML… by Mathew Mannion on this entry
  • You are my hero. by Mathew Mannion on this entry
  • And may all your chickens come home to roost – in a nice fluffy organic, non–supermarket farmed kind… by Julie Moreton on this entry
  • Good luck I hope that you enjoy the new job! by on this entry
  • Good luck Kieran. :) by on this entry

Galleries

Not signed in
Sign in

Powered by BlogBuilder
© MMXX