Sunday, January 01, 2006

Java Performance Primer

For high performance computing using Java, threads are critical. Infact, they are absolute necessity.

Read up on Double Checked Locking Pattern at the following locations:
Wikipedia entry

Read up on Concurrency Patterns at:
Concurrency Patterns

Pointers to stack traces:
An Introduction to Stack Traces
Analyzing Stack Traces
Tracing Thread Activity Using Stack Dumps
Debugging Thread Related Hangs in the JVM

Tuning the JVM:
Tuning the JVM
TurboCharge Java HotSpot VM

Profiling Architecture

JVM Hotspot Options (look for stacksize settings):
JVM Hotspot Options

MacOSX JVM Options

TO checkout the options,
To see a listing of the interpreter's "non-standard" commandline arguments type the following statement at a commandline prompt:

java -X

The results of the "java -X" statement are therefore as follows:

-Xmixedmixed mode execution (default)
-Xint interpreted mode execution only
set search path for bootstrap classes and resources
append to end of bootstrap class path
prepend in front of bootstrap class path
-Xnoclassgc disable class garbage collection
-Xincgc enable incremental garbage collection
-Xloggc: log GC status to a file with time stamps
-Xbatch disable background compilation
-Xms set initial Java heap size
-Xmx set maximum Java heap size
-Xss set java thread stack size
-Xprof output cpu profiling data

Andy Oliver's GC Tuning EMail

Difference between Green and Native Threads
Java and Solaris Threading

Objects and Thread Seminar

Specifying the stack size per thread:
Non-standard way is to provide it as a command line option.
The other way is via the constructor introduced in JDK5.0
Thread Ctr

Annoyance with Socket Timeouts:
Socket Time Outs in Java

No comments: