Sunday, March 30, 2008

JBoss Monitoring and Performance

JBoss page how to slim your JBoss AS
Tuning JBoss on linux article

Memory and thread Montoring (see chapter 10 in JBoss 4.2 Server configuration guide)

MBean
In the JMX-console: jboss.system:type=ServerInfo MBean (view interesting attributes like FreeMemory, ActiveThreadCount etc.)

Checklist
(Read more about this in the book "JBoss Seam - Simplicity and Power beyond Java EE")
1. Use "Call by reference" (see JBoss Reference)
2. Optimize JVM (start using the -server option)
- Give at least 75 percent of the physical RAM to the JVM ( JAVA_OPT in bin/run.sh)
- set JAVA_OPTS=%JAVA_OPTS% -Xms1024m -Xmx1024m -XX:PermSize=256m -XX:MaxPermSize=512
- Using the same value for Xms and Xmx will force JVM to use specified value (in this case 1GB)
- -Xms2g and -Xmx2g would force JVM use 2G of RAM for example
3. Garbage Collector (use parallel GC) or what might be best for you JVM/application
- Run parallel GC
set JAVA_OPTS=%JAVA_OPTS% -XX:+UseParallelGC -XX:+UseParallelOldGC
4. Reduce logging (see
JBoss page how to slim your JBoss AS)
5. Tuning the HTTP Thread Pool (see JBoss page how to slim your JBoss AS)
6. Client- or Server-Side State Saving (really depends on your application and RAM vs. Mhz)
There are more things you can do like using Second-Level Cache and Clustering.

No comments: