Solved

RMI Performance Slow... Any Help?

Posted on 1998-01-16
4
822 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Way to decrease size of apk file 9 110
arguments to jar 5 40
spring maven example issues 3 44
Delete .class files at every compile 4 26
Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.

730 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