Helping ordinary people create extraordinary websites!
HOME TUTORIALS SCRIPTS WEB HOSTING BLOG FORUM
Get Our Newsletter
Email:

Java and SNA: A case study

By Matt MacKinnon, Adam King, David Kaminsky
2003-05-24


Performance

Because Java is an interpreted language, many people are concerned about its performance. We conducted an experiment to determine Java's impact on network performance.

For our benchmark, we used the Update transaction. Update requires three network flows: a "request" from the client to the server; a "reply" from the server to the client; and an "update" from the client to the server. In our experiment, each of the flows contained the same number of bytes.

Our server was a 150 MHz Pentium Pro (tm) computer with 32MB of RAM running OS/2 Warp and CommServer for OS/2 with the Access Feature. Our client was also 150 MHz Pentium Pro (tm) computer running OS/2 Warp and CommServer for OS/2 with the Access Feature; the client had 64MB of RAM. The test was conducted on an isolated 16Mbit/sec token ring.

We wrote the Update client in both C and in Java; the server was written in C and was pre-loaded. We measured only the time to execute a 2,000 iteration transaction loop; the start-up time for the Java interpreter was not included. We ran each client five times, for a total of 10,000 iterations. The standard deviation among the five trials was less than 2%.

The times per transaction are given below:

Bytes/SendC client (msec)Java client (msec)Difference (msec)
25610.916.25.3
102412.417.55.1
409615.720.95.2
1638436.441.55.1

Switching from C to Java results in a small, constant performance loss of about 5.2 msec per transaction on the client. Since the amount of Java code executed--the only difference between the two clients--does not depend on the number of bytes sent, the constant variation is unsurprising. Since the difference is so slight, it will be unnoticed during interactive work.

It is important to note that there is no performance impact on the server. The server is written in C and is identical for both clients. Thus, implementing the client in Java does not reduce the number of server transactions.



Tutorial Pages:
» Java and SNA: A case study
» The Java/CPI-C API
» Classic Transaction #1: The Pipe
» Classic Transaction #5: The Database Update
» Native Calls
» Diversion: Native Calls and Applets
» Performance
» CPIC Calls That Have Been Implemented
» Conclusions
» Footnotes


First published by IBM DeveloperWorks


 | Bookmark
Related Tutorials:
» All about JAXP, Part 1
» Make Database Queries Without the Database
» Load List Values for Improved Efficiency
» 2 Ways To Implement Session Tracking
» A Simple Way to Read an XML File in Java
» Develop Aspect-Oriented Java Applications with Eclipse and AJDT