Java Performance Tuning | eWeek

Java Performance Tuning

Written By
Timothy Dyck
Timothy Dyck
Feb 25, 2002
2 minute read
eWeek content and product recommendations are editorially independent. We may make money when you click on links to our partners. Learn More

A big part of tuning the performance of a Java application server is tuning the Java VM in which the application server runs.

On some platforms, organizations will have a choice of Java virtual machines. Sun Microsystems Inc. and IBM both produce their own VMs for several operating systems, and other platform vendors also make a Java VM tuned for their platforms. In these cases, organizations can choose the VM that handles their workloads the best.

In our setup (using BEA Systems Inc.s WebLogic 6.1 running on Windows 2000 Advanced Server), we ran tests using Java 1.3 VMs from Sun and IBM.

We found the IBM Java VM more stable (we had three crashes of the Sun VM during three weeks of testing and none with the IBM VM while we were using it) but also found the IBM VM took up about 20 percent more CPU on the same workload as the Sun VM (when the Sun VM was in its most optimized state).

We used the Sun VM for all our measured runs because we were concerned that we might run out of application server CPU capacity before database CPU capacity (and thus be testing the wrong part of our infrastructure).

After many variants of Sun VM settings, we found the best-performing configuration was just to set minimum and maximum heap size to 512MB of RAM and enable the Hotspot just-in-time compiler.

We also made a configuration change that made a major difference in performance with the Sun VM (but not with the IBM VM) that was passed on to us by BEA staff—limiting each Sun VM to using a maximum of two CPUs each.

Theoretically, the Sun VM was supposed to scale to work on the six-CPU systems we used as application servers, but in practice, this was not the case.

Binding each of the VMs to a different set of two CPUs (done by right-clicking on a process name in the Processes tab of the Task Manager) provided an immediate 30 percent reduction in overall CPU usage.

eWeek Logo

eWeek has the latest technology news and analysis, buying guides, and product reviews for IT professionals and technology buyers. The site's focus is on innovative solutions and covering in-depth technical content. eWeek stays on the cutting edge of technology news and IT trends through interviews and expert analysis. Gain insight from top innovators and thought leaders in the fields of IT, business, enterprise software, startups, and more.

Property of TechnologyAdvice. © 2026 TechnologyAdvice. All Rights Reserved

Advertiser Disclosure: Some of the products that appear on this site are from companies from which TechnologyAdvice receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. TechnologyAdvice does not include all companies or all types of products available in the marketplace.