ITworld.com
  Search  
ITworld Home Page ITworld Webcasts ITworld White Papers ITworld Newsletters ITworld News ITworld Topics Careers ITworld Voices ITwhirled Changing the way you view IT
Java Tuning and Java Virtual Machines, Part 1
JAVA TUTOR --- 09/04/2002

Adrian Cockcroft

One of the nice things about Java is that investment levels are very high. This means that everyone is competing to provide the fastest Java Virtual Machine, and speeds are increasing all the time. This can trap the unwary. Things that are slow in one release can suddenly become fast in the next one. You must be very careful not to write unnatural code just for the sake of short-term performance gains. The recent introduction of first-generation Just In Time (JIT) compilers has made loops go much faster, but they do not speed up method invocations very much. As more JIT-based optimizations are perfected more language features will be accelerated. The cost is that the JIT compiles code at runtime, so initial application startup can be slower. 

On this topic

On Solaris, there are several versions of Java, summarized in the table below. Java is upwards compatible, but if you use recent features you cannot go back and run the code on earlier releases. The Java 1.0 specification and its support classes were found to have problems in some areas. Java 1.1 was based on a lot of user feedback and takes code from several vendors, not just Sun, to provide a much more robust and usable standard that should remain stable for much longer than 1.0.

Vendor Browser Version JIT? Java compatible JavaSoft Appletviewer JDK 1.0.2 No 1.0 JavaSoft Appletviewer JDK 1.1.3 Yes 1.0 and 1.1 JavaSoft HotJava 1.0 Yes 1.0 and 1.1 Netscape Navigator 2.0 and 3.0 No 1.0 Netscape Navigator 4.0.2 Yes 1.0 and most 1.1

GPercollator Examples
The GUI is shown below with a single set of data (one days worth) loaded showing HTTP rates, running as a program. I set the base of the Y-axis to zero and asked it to integrate the data to get the daily total.

GPercollator GUI
If I append several days of data, clone the sequence twice and pick HTTP operations/second, the peak 5-second rate, and the status code display, it gets a lot busier, and the graph update slows down.

GPercollator Performance and Size Issues
The two operations that we timed using Metrognomes in GPercollator are the graphical display update and the data load from URL operation. At present they seem to run reasonably quickly, but as the amount of data on the display increases the update slows down. An "Info" button triggers one display option. This shows credits, the version, and the Metrognome summaries.

Next Week: Java Tuning and Java Virtual Machines, Part 2

 

Adrian started out as a software engineer and UNIX system administrator and was one of the first customers of Sun in the UK circa 1984. In 1988 he joined Sun UK as a Systems Engineer and built a reputation as a specialist in SPARC and performance- related issues. In 1993 Adrian transferred to Sun's corporate headquarters in the USA to work for SMCC Technical Product Marketing. A major function of this group is to create the technical information required to support Sun's Systems Engineers on a worldwide basis. He now works in the Server Division of SMCC, and in April 1996 relocated back to the UK, teleworking to California. Adrian is the author of Sun Performance and Tuning: SPARC and Solaris, published by Sun Microsystems Press/PTR Prentice Hall.



Advertisements
Sponsored links
KODAK i1400 Series Scanners stand up to the challenge
Top 5 Reasons to Combine App Performance and Security
Locate Hidden Software on business PCs with this free tool
Bring harmony to your mix of UNIX-Linux-Windows computing environments
 Home   Newsletters  JAVA TUTOR
www.itworld.com    open.itworld.com     security.itworld.com     smallbusiness.itworld.com
storage.itworld.com     utilitycomputing.itworld.com     wireless.itworld.com

 
Contact Us   About Us   Privacy Policy    Terms of Service   Reprints  

CIO   Computerworld   CSO   GamePro   Games.net   Industry Standard   Infoworld   ITworld  
JavaWorld   LinuxWorld  MacUser   Macworld   Network World   PC World   Playlist  

DEMO   IDG Connect   IDG Knowledge Hub   IDG TechNetwork   IDG World Expo  

Copyright © Computerworld, Inc. All rights reserved

Reproduction in whole or in part in any form or medium without express written permission of Computerworld Inc. is prohibited. Computerworld and Computerworld.com and the respective logos are trademarks of International Data Group Inc.