Solved

RMI Performance Slow... Any Help?

Posted on 1998-01-16
4
813 Views
Last Modified: 2012-06-22
I have developed a RMI application in visual age for java, but the perform is very slow. (P.C. : 266MHz Pentium 2, 64MB, 600MB free hard disk space).

For example, to retrieve and populate 3 lists with data from  informix database is about 16sec.

The network that I am working on is Token Ring.

Is there any way I can improve RMI performance?
0
Comment
Question by:kiatyian
  • 2
4 Comments
 
LVL 6

Expert Comment

by:jpk041897
ID: 1232238
One of the problems you might be running into (without seeing the pertinent parts of the code) is that you might be transfering a single field (or record) at a time. This causes considerable network overhead plus causing the DB to re-querry each time

If this is the case, try building a record that transfers an array, thus buffering the information, or building a large string  (or group of large strings) containing the result set of your Querry.

In general, what you need to pursue is to transfer large blocks of data per RMI transaction.

You could also implement an RMI buffering mechanism, but this is probably more work than is wort for your application.
0
 

Author Comment

by:kiatyian
ID: 1232239
Hi jpk,

In fact, the result set retrieved from the database has been buffered into an array. The number of records retrieved for the 3 list boxes are 60, 200, 200 respectively.

According to your experience, have you encountered such performance problem in RMI? If you don't, how did you do that?

Thanks for your reply.


0
 
LVL 6

Expert Comment

by:jpk041897
ID: 1232240
I dropped RMI in favor of CORBA. RMI's binding mechanism is slow.

Best way to check if your problem is network centered or binding centered is to bind over a local loopback (127.0.0.1).

Time this close loop, if your problem is Binding oriennted, than you might want to consider changing dynamic binding to static binding. If the times are slow, look for proxy servers, firewalls, trafic and/or combinations of the above. Also check for your DB servers response times and work load. RMI is slow, but not nearly as slow as you are experiencing.
0
 
LVL 5

Accepted Solution

by:
fontaine earned 100 total points
ID: 1232241
Your problem is probably related to this FAQ:

"Why does naming bind and lookup takes an extraordinarily long time on Windows?"

http://java.sun.com/products/jdk/rmi/faq.html#bind

Be also sure your RMI server connects once for all to the database, instead of opening a new database connection for each new query, for example.


0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now