Chapter 5. Performance guidelines 65
5.5.1 Selecting a JVM
High-performance JVMs are critical for good performance. Here are some
considerations when evaluating JVMs:
1. Java compiler and virtual machine technology changes rapidly. Today a
JIT version of a compiler may provide the best performance for your
solution; Tomorrow it may be a static compiler, and next week there may
be a new technique.
2. A JVM should be certified for portability by a recognized certification
authority such as JavaSoft.
3. JVMs that have been optimized for a specific operating system tend to
perform better than other JVMs.
4. Systems with symmetric multiprocessors (SMP) tend to perform better
because of the thread support in Java. Use JVMs that effectively support
5. Evaluate the trade-off between the stability of the current release of a JVM
and the performance enhancements available in the newest beta release
and/or production version.
Generally speaking, the selection of a JVM should be of little concern to you.
The performance of applications can often be better improved by improving
the runtime characteristics of the algorithms used. However, there are
circumstances, such as computationally intensive programs, where an
improvement in the performance of the underlying JVM will add to the
solution’s overall performance.
Each application server has its own thread pool from which it uses threads to
process remote method invocations. This pool size varies throughout the
servers lifetime. Threads are created when needed and destroyed when there
are too many idle threads. Each application server has a setting for thread
pool size. Consider increasing the thread pool size if analysis shows that the
maximum number of threads in the pool are frequently in use.
The addition of memory to a system almost always improves performance.
This is because physical I/O is a relatively expensive operation in terms of
latency. It makes intuitive sense that by, dedicating memory in a Web server
to store frequently accessed HTML pages and images, you will improve
performance. As a rule of thumb, your Web server should have enough RAM
to accommodate all network buffers, frequently used applications, images