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|

Our valued sponsors who help make this site possible
New Relic: Try free w/ production profiling and get a free shirt! 

Site24x7: Java Method-Level Tracing into Transactions @ $12/Month/JVM. Sign Up! 

Newsletter no. 2, January 19th, 2001

jKool for DevOps
Light up your Apps & get a cool t-shirt

JProfiler
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:


New Relic
New Relic: Try free w/ production profiling and get a free shirt!

Site24x7
Site24x7: Java Method-Level Tracing into Transactions @ $12/Month/JVM. Sign Up!


jKool for DevOps
Light up your Apps & get a cool t-shirt

JProfiler
Get rid of your performance problems and memory leaks!


This month, there is a definite server based flavor to the articles I've added to my site. Several of the recently published performance articles are server focused. And my search backlog coincidentally also threw up some server related pages including several IBM papers on tuning Java in WebSphere, which provide useful generic server-Java tuning tips. (Note that apart from my book, all product related listings are for your information, and should not be considered as an approval or disapproval of that product. I do recommend my book, of course.)

For those of you with any experience in developing server cores (the underlying server framework, not EJBs etc.), you may be delighted to hear about Matt Welsh's non-blocking I/O library. This uses the JNI to give access to the select(2)/poll(2) system call, allowing efficient multiplexing of multiple i/o streams without using a thread per stream.

Finally, this month Kirk Pepperdine starts a useful roundup of Java performance discussion groups.

Articles

I haven't had time to extract the tips from these two yet.

Recent articles

All the following page references have their tips extracted below.

Articles, papers & packages less than six months old

New from us

My colleague Kirk Pepperdine will be producing his own idiosyncratic roundup of some of the interesting discussions from the various Java performance discussion groups. We currently know of the two at TheServerSide and JavaRanch. If you know of any other Java performance discussion groups, please let us know (mail us from this page).

Kirks article follows just below.

Other additions to the website

I've extracted the tips from even more pages beyond those listed above, and I've also listed some interesting performance reports and a couple more tools.

Jack Shirazi


Kirk's roundup

When I first pointed my browser at http://www.javaranch.com, "What?" I couldn?t help but thinking, "What is this?. The theme is corny but they are offering a chance to win a book." So, I dutifully filled out the registration form and then started to browse. The topic in the performance forum, "Most common costliest Elements of Java", looked interesting and there were a number of responses so, I clicked in.

Although the question seemed fairly ordinary, the responses clearly demonstrated that this site was anything but corny. A quick summary of the thread would be: "object creation, casting, synchronization and exceptions are the most costly elements of Java". Of the four, I will focus here on exceptions.

The performance impact of using Exceptions is becoming better known. What is not so well known is why Exceptions degrade performance. In the discussion, Peter Haggar does a masterful job of explaining what happens when you create and throw an exception. The cost of using exception shows up in several ways. First, throwing an exception means that you?ve just created a new object. But, as Peter points out, the constructor in Throwable calls the native method, fillInStackTrace(). This method walks the stack frame collecting trace information. Peter then goes on to point out that using exceptions requires extra bytecodes. Using exceptions requires an additional table in the class file. Throwing an exception disrupts the normal flow of the execution in the JVM. The JVM must take the costly step of fixing the call stack when an exception is thrown. In the end Peter quite rightfully points out that you should "use exceptions for error conditions, not for control flow."

The density of usable information on this discussion group makes it a very worthwhile trip. I look forward to reviewing this group and others for future editions of this newsletter.

Kirk Pepperdine


Tips

http://theserverside.com/home/thread.jsp?thread_id=3276
Some performance tips (Page last updated January 2001, Added 2001-01-19, Author Shyam Lingegowda). Tips:

http://www.joot.com/articles/practices.html
Good Java practices, some of which are good for performance. This page has already been listed on the Tuning Tips page, and the following tips are new items that have been added to the page since it was last listed (Page last updated January 2001, Added 2001-01-19, Author Dave Jarvis). Tips:

http://www.javareport.com/html/from_pages/article.asp?id=252
Detailed article on load testing systems (Page last updated January 2001, Added 2001-01-19, Author Himanshu Bhatt). Tips:

http://www.javareport.com/html/from_pages/article.asp?id=249
Article about frameworks and the effective memory management of objects; avoiding memory leaks by design. (Page last updated January 2001, Added 2001-01-19, Author Leonard Slipp). Tips:

http://www.devx.com/free/articles/2000/maso01/maso01-1.asp
Article on using syslog to track performance across distributed systems (Page last updated December 2000, Added 2001-01-19, Author Brian Maso ). Tips:

http://www.onjava.com/pub/a/onjava/2000/12/15/ejb_clustering.html
"EJB2 clustering with application servers" (Page last updated December 2000, Added 2001-01-19, Author Tyler Jewell). Tips:

http://developer.java.sun.com/developer/community/chat/JavaLive/2000/jl1212.html
Sun community chat session with Bill Shannon, Kevin Osborn, and Jim Glennon on JavaMail (Page last updated December 2000, Added 2001-01-19, Author Edward Ort). Tips:

http://www.cs.berkeley.edu/~mdw/proj/java-nbio/
Whoopee!! A non-blocking I/O library for Java. This is the single most important functionality missing from the SDK for scalable server applications. The important class is SelectSet which allows you to multiplex all your i/o streams. If you want a scalable server and can use this class then DO SO. (Page last updated November 2000, Added 2001-01-19, Author Matt Welsh). Tips:

http://www.ibiblio.org/javafaq/slides/sd2000east/javaio/Java_I_O.html
Java I/O tutorial by Elliotte Rusty Harold (author of O'Reilly's Java I/O book). (Page last updated November 2000, Added 2001-01-19, Author Elliotte Rusty Harold). Tips:

http://www.javaworld.com/javaworld/jw-11-2000/jw-1110-smartproxy.html
Article on using smart proxies. (Page last updated November 2000, Added 2001-01-19, Author M. Jeff Wilson). Tips:

http://java.oreilly.com/news/jsptips_1100.html
Hans Bergsten's top ten JSP tips (Page last updated November 2000, Added 2001-01-19, Author Hans Bergsten). Tips:

http://www-4.ibm.com/software/webservers/appserv/ws_bestpractices.pdf
Paper detailing the "Best Practices for Developing High Performance Web and Enterprise Applications" using IBM's WebSphere. All the tips are generally applicable to servlet/EJB development, as well as other types of server development. (Page last updated September 2000, Added 2001-01-19, Author Harvey W. Gunther). Tips:

http://www-4.ibm.com/software/webservers/appserv/3steps_perf_tuning.pdf
Tuning IBM's WebSphere product. White paper: "Methodology for Production Performance Tuning". Only non-product specific Java tips have been extracted here. (Page last updated September 2000, Added 2001-01-19, Author Gennaro (Jerry) Cuomo). Tips:

http://developer.java.sun.com/developer/community/chat/JavaLive/2000/jl0829.html
Sun community chat session with Steve Wilson and Jeff Kesselman on Java Performance (Page last updated August 2000, Added 2001-01-19, Author Edward Ort). Tips:

http://www.awlonline.com/product/0,2627,0201616467,00.html
Peter Haggar's Practical Java Programming Language Guide. (Page last updated 2000, Added 2001-01-19, Author Peter Haggar). Tips:

http://www.redbooks.ibm.com/abstracts/sg245657.html
WebSphere V3 Performance Tuning Guide (Page last updated March 2000, Added 2001-01-19, Authors Ken Ueno, Tom Alcott, Jeff Carlson, Andrew Dunshea, Hajo Kitzh?fer, Yuko Hayakawa, Frank Mogus, Colin D. Wordsworth). Tips:

Books

http://www.awlonline.com/product/0,2627,0201616467,00.html
Practical Java Programming Language Guide by Peter Haggar. This book includes a good-size section on performance. The Praxis list from that section is on the Tuning Tips page.

Reports

http://www-4.ibm.com/software/webservers/appserv/wcat.pdf
A "we're great and they suck" performance comparison by IBM of IBM WebSphere vs. Microsoft IIS.

http://www.adtmag.com/Pub/article.asp?ArticleID=2009
Non-technical article with basic performance comparisons of some leading application servers (Page last updated November 2000, Added 2001-01-19, Author Rich Seeley). Tips:

http://developer.java.sun.com/developer/technicalArticles/Networking/HotSpot/
Steven Meloan's in depth look at the HotSpot Performance Engine (June 1999)

http://www.javalobby.org/features/jpr/part3.html
The Java Performance Report, Part III from September 2, 2000, by Osvaldo Pinali Doederlein. If you are still looking for comparitive performance reports (JVM vs JVM, Java vs C), this is pretty useful.

Tools

http://www7.software.ibm.com/vad.nsf/data/document4361?OpenDocument&p=1&BCT=1&Footer=1
WebSphere Studio Page Detailer

http://www.towerj.com/pressroom/analyzer.shtml
TowerJ Application Performance Analyzer

Jack Shirazi


Last Updated: 2017-03-01
Copyright © 2000-2017 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/newsletter002.shtml
RSS Feed: http://www.JavaPerformanceTuning.com/newsletters.rss
Trouble with this page? Please contact us