Skip to main content

Tools and Tips slides available

Posted by claudio on June 25, 2008 at 6:36 AM PDT

You can see my presentation about Tools and Tips to Diagnose Performance Issues on-line or download it.

It was great, because the room was almost full, people keep taking pictures, looks like the topic was interesting.

Some people asked questions at the end, where I want to answer here, to a broad audience.

All of them are hard questions. As there is no recipe to answer them.

Q.1) What is the best value for stack size (-Xss) parameter ?

Q.2) What is the best value for young generation (-XX:NewSize -XX:MaxNewSize) ?

Q.3) How to diagnose OOME issues with JDK 1.3 on windows ?

R.1) There is no "best value" it depends of the java runtime system. If possible, do some experiments, to see how it behaves for different sizes. But the lower the size, more memory efficient.

I had worked with 256k and 512k, for application servers.

Depending of the operating system and JDK, the java stack size, is the same as the operating system, see it:

$ ulimit -a|grep stack
stack size              (kbytes, -s) 8192

R.2) If possible, don't configure it, let JRE set its default value. But, as someone have asked, see it below.

If young generation needs to be customized, it means the default don't apply here.

Java runtime needs to be monitored to understand the allocation activity going on and out of young generation. Try to adjust it in a way that don't span a full garbage collector (on old generation) very often. If there is memory leak going on, a full gc can be triggered.

R.3) That is the hard one, as JDk 1.3 has reached End of Line support at Sun and lack most serviceability found in recent JDK, like jmap and jstat. With JDK 1.3 one can use some unix tools to introspect the process, but the atendee asked about windows, that is even bad, because I do not do much work on windows platform and have no knowledge about windows diagnostic tools.

What I really recommend, is to reproduce the java system in a isolated machine, use at least JDK 1.4 latest release and configure -XX:+HeapDumpOnOutOfMemoryError.

If the system is flexibe, put the application on more recent releases of JDK and servers.

Related Topics >>