[an error occurred while processing this directive]
Java Performance Tuning

Java(TM) - see bottom of page

|home |services |training |newsletter |tuning tips |tool reports |articles |resources |about us |site map |contact us |
Tools: | GC log analysers| Multi-tenancy tools| Books| SizeOf| Thread analysers| Heap dump analysers|

Our valued sponsors who help make this site possible
JProfiler: Get rid of your performance problems and memory leaks! 

Training online: Threading Essentials course 

Newsletter no. 4, March 21st, 2001

Get rid of your performance problems and memory leaks!

Java Performance Training Courses
COURSES AVAILABLE NOW. We can provide training courses to handle all your Java performance needs

Java Performance Tuning, 2nd ed
The classic and most comprehensive book on tuning Java

Java Performance Tuning Newsletter
Your source of Java performance news. Subscribe now!
Enter email:

Training online
Threading Essentials course

Get rid of your performance problems and memory leaks!

This month I've pulled out those Weblogic tips I promised. In addition we've listed Java performance articles on the full range of development: managing performance; designing performance; server-side performance; client-side performance; games performance; JDK 1.4 performance improvements; and more.

The two JDBC performance tuning articles listed (one Weblogic's, one IBM's) are probably the best ones I've seen on that subject. We've also had a bunch of tool references sent in to us. And last, but not least, Kirk continues his diverse and edifying roundup.

Finally, a note for our Japanese readers. Yukio Andoh has kindly volunteered to translate the newsletters into Japanese: there will probably be a delay of a week or so, after which you can find the Japanese version at http://www.hatena.org/JavaPerformanceTuning/


Sun have scheduled an interesting sounding community chat session with Steve Wilson and David Stoutamire, entitled 'Tuning the Java Runtime Environment for "Big Iron"' scheduled for March 27 11:00 a.m. Pacific Time/7:00 p.m. GMT. ( http://developer.java.sun.com/developer/community/chat/)

Recent Articles

All the following page references have their tips extracted below.

Older Pages (including Weblogic tips)

All the following page references have their tips extracted below.

Other additions to the website


Jack Shirazi

Kirk's roundup

Here is this month?s roundup of the performance tuning discussions down at the Saloon in the Java Ranch (www.javaranch.com).

One participant was looking to see if he could measure run times down to the microsecond. We never learned why someone would want this level of precision. But, it is interesting that just about everyone repeatedly loops short calls to obtain timings on those short calls. I would think that unless the loop itself represented a loci of execution, then you?d be better off spending your time elsewhere.

Which technology among JSP, CORBA, SERVLETS, ASP should be used to achieve the best response time? This very loaded question came up. Each of these technologies has a cost but also brings benefits. Some might consider that since JSP is compiled into Servlets then just using a Servlet might bring more performance. That, of course, would be assuming that the JSP compiler was not as good at creating code as your developers may have been. Creating a benchmark that is applicable to your situation is usually the best way to answer these questions.

An interesting point regarding swapping, GC, and performance came out of a discussion on what the largest max heap size setting could be. To summarize, the respondent quite correctly pointed out that one should not set max heap size to a value larger than physical memory. If the system has a fair amount of churn, then there could be a large number of objects waiting for GC. Thus GC could cause a lot of swapping which could have a detrimental effect on performance.

Is it better to use an iterator or convert your collection to an array? The assumption here is that direct access to an element in an array is much faster than using the iterator. One respondent commented that the difference is maybe between 2 to 13 times faster. In light of this, another patron offered some heuristics for making the choice. You need to consider the cost of conversion and the number times that you?ll be iterating through the array. Again, this represents another example of where a benchmark may help clear things up.

If you mosey on over to The Server Side?s (www.theserverside.com) performance tuning folks, you?ll find there?s a lengthy discussion going on about weak and soft references. An object that is held only by a WeakReference will be GC?ed as soon as possible. An object that is held only by a SoftReference will be GC?ed when a VM is short on memory. That?s the theory. In practice, one participant noted that "VMs eat references like there?s no tomorrow". Even so, if you?re implementing a cache, then using a SoftReference may give you advantages in the future.

Can using an OODB improve your performance? In my experience, it can reduce the amount of code that you deliver by about 40% (JDBC not included). An OODB seems to help when: your DOM is quite complex; or where you have high scaling requirements.

Java vs. Stored Procedures: how do you decide between them? A theme that was repeatedly echoed was where one needed to increase performance by reducing the number of network round trips. This is a very familiar solution to a very common problem in distributed computing. There were some red flags raised concerning design. Since my outlook is very OO, I?ll side with the contributors that only pushed application logic into a stored procedure when performance dictated it. If you wish to form your own (possibly more objective) view, I recommend that you check out the discussion for yourself. You?ll be glad that you did.

Kirk Pepperdine.


Performance planning for managers (Page last updated February 2001, Added 2001-03-21, Author Jack Shirazi). Tips:

Designing Entity Beans for Improved Performance (Page last updated March 2001, Added 2001-03-21, Author Beth Stearns). Tips:

Pseudo Sessions for JSP, Servlets and HTTP (Page last updated March 2001, Added 2001-03-21, Author Budi Kurniawan). Tips:

Clustering for J2EE and Java application servers. Looks at Bluestone Total-e-server, Sybase Enterprise Application Server, SilverStream Application Server, and WebLogic Application Server. (Page last updated February 2001, Added 2001-03-21, Author Abraham Kang). Tips:

Tracking Memory leaks (Page last updated February 2001, Added 2001-03-21, Author Jim Patrick). Tips:

Benchmarking JMS (Page last updated March 2001, Added 2001-03-21, Author Dave Chappell, Bill Wood). Tips:

Designing Java Performance: reducing object creation (Page last updated March 2001, Added 2001-03-21, Author Brian Goetz). Tips:

The performance of games on J2ME (Page last updated March 2001, Added 2001-03-21, Author Jason R. Briggs). Tips:

Introductory level article on threading applets (Page last updated March 2001, Added 2001-03-21, Author Monica Pawlan). Tips:

Speeding up file searching in JFileChooser (Page last updated February 2001, Added 2001-03-21, Author Slav Boleslawski). Tips:

Using a ternary search tree for fast searches of partial text matches (Page last updated February 2001, Added 2001-03-21, Author Wally Flint). Tips:

JDBC Performance Tips (targetted at AS/400, but generically applicable) (Page last updated February 2001, Added 2001-03-21, Authors Richard Dettinger and Mark Megerian). Tips:

JDK 1.4 features update (Page last updated March 2001, Added 2001-03-21, Author Vinay Aggarwal). Tips:

Weblogic tuning (generally applicable Java tips extracted) (Page last updated June 2000, Added 2001-03-21, Author BEA Systems). Tips:

Weblogic JDBC tuning (Page last updated April 1999, Added 2001-03-21, Author BEA Systems). Tips:

Weblogic's RMI framework (Page last updated January 1999, Added 2001-03-21, Author BEA Systems). Tips:

Basic performance tuning intro (Page last updated March 2000, Added 2001-03-21, Author Reggie Hutcherson). Tips:

Jack Shirazi

Last Updated: 2019-08-29
Copyright © 2000-2019 Fasterj.com. All Rights Reserved.
All trademarks and registered trademarks appearing on JavaPerformanceTuning.com are the property of their respective owners.
Java is a trademark or registered trademark of Oracle Corporation in the United States and other countries. JavaPerformanceTuning.com is not connected to Oracle Corporation and is not sponsored by Oracle Corporation.
URL: http://www.JavaPerformanceTuning.com/newsletter004.shtml
RSS Feed: http://www.JavaPerformanceTuning.com/newsletters.rss
Trouble with this page? Please contact us