Solved

RMI Performance Slow... Any Help?

Posted on 1998-01-16
4
818 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

Does Powershell have you tied up in knots?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
micro services vs rest web services 16 108
Maven Project: Hibernate Dependencies Conflict 10 26
servlet example issue 6 40
login jsp example 24 51
For customizing the look of your lightweight component and making it look lucid like it was made of glass. Or: how to make your component more Apple-ish ;) This tip assumes your component to be of rectangular shape and completely opaque. (COD…
Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.

825 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