Performance Tuning the JBoss Application Server on Linux
Full Tuning Guide Available to Subscribers ONLY
When do you consider performance tuning? Performance tuning needs to be considered at all phases of the development cycle &150; from Design right through to Deployment.
Set performance goals that need to be achieved before moving to production (e.g. Concurrency, QoS etc).
Have specific goals - such as xyz() must return within 2.5 seconds.
Ensure that goals can be tested, for example build unit tests, load testing scripts and logging in to your project design.
Follow a Design, Develop, Tune development process until all of your goals have been achieved.
Design for Performance! Think about caching, network topology, do you need separate layers (e.g. EJB and Servlet/JSP) etc etc. More layers != More Security.
Choose your hardware! No hard and fast rules &150; guidance for large systems = 64 bit Hardware, OS & JVM &150; small & medium systems &150; 32 bit Hardware, OS & JVM.
Java - Use synchronization only when needed! Avoid using multiple connections. Use collections correctly. Avoid i/o where possible. Databases need to reflect application usage.
RHEL/Linux Hints &150; upgrade to kernel 2.6 &150; NPTL introduced in to the kernel. Raise Max file handles. Raise user limit. You may need to tweak network buffers etc. Use big memory pages &150; 64 bit systems can cope with 4GB heaps.
JVM &150; understand how garbage collection works with your JVM. Use 1.4.2 or later &150; huge performance gains with JDK5. Concurrent or Parallel GC. Consider using fixed heap sizes. Increase the maximum perm space. Tune the Java stack from �MB per thread to something lower! See SPECjAppServer2002 for examples.
Databases &150; Use RAID 0+1. Use 'hdparm' to tune disk performance. Prefer MVCC engines. Beware of bad JDBC drivers, BLOB support and shared memory mgmt.
JBossAS &150; remove unused services. Disable hypersonic. Tune RMI DGC if using < JBossAS 4.0.4. Tweak logging and deployment scanner settings. Ask do you really need clustering? Tune connection pooling sizes and when to use connection verifiers.
For more information please visit www.jboss.com or email firstname.lastname@example.org