Hello, Mike Arachtingi,

>When I run this
>as a stand-alone program, my results show an average invocation time of
>about 3 - 4ms.  When I run the same program as a web app (tomcat 4.0.1,
>or 4.0.4) I'm seeing averages around 80 ms.

80ms doesn't sound too slow to me!  But you've made a very interesting observation.  I 
don't have much experience with RMI, and I've never looked at Tomcat's source code.  
But this is a mailing list, so I don't see why these facts should stop me from writing 
a response!  ;-)

In your Test program, I would try starting up a second "do nothing" thread before you 
run your RMI test.  All it would do in its run() method is this:

while ( true )
{
   synchronized( this )
   {
           wait( 10 );
   }
}

With that running, how much slower is your RMI test?

Tomcat is somehow always listening on 1 or more ports for incoming requests...  (that 
code is probably not in Tomcat, but in the JDK Socket stuff...)  Those have got to eat 
up a few resources.  Now, I don't imagine my "do nothing" thread is an accurate 
simulation of a web server waiting for incoming requests, but it must be better than 
nothing!

yours,

Julius Davies, Programmer, CUCBC
Email: [EMAIL PROTECTED], Ph: 604.730.6385


ps to Derek:  any thoughts?


> -----Original Message-----
> From: Arachtingi, Mike [mailto:[EMAIL PROTECTED]]
> Sent: Friday, January 31, 2003 2:07 PM
> To: [EMAIL PROTECTED]
> Subject: RMI Performance problem
> 
> 
> Has anyone noticed a performance problem, using RMI from within a web
> app?  
> I developed a test program that looks up a remote object, and sends it
> 99 messages (i.e., invokes one of the remote methods.)  When 
> I run this
> as a stand-alone program, my results show an average 
> invocation time of
> about 3 - 4ms.  When I run the same program as a web app 
> (tomcat 4.0.1,
> or 4.0.4) I'm seeing averages around 80 ms.
>  
> JProbe confirms that cpu time is primarily spent in
> sun.rmi.server.UnicastRef.invoke( )   
>  
> I don't have the sun.rmi source right now (I've looked on Sun One, but
> can't find it --  anyone know the URL?), so I don't have any 
> idea what's
> the hang up.
>  
> Anyone have insight into this?   I saw a similar thread msg77001 "RMI
> Class Annotation",  in which a fellow sees 800 ms per 
> invocation for his
> test, but he was talking about JBoss, and huge classpaths.  Or, am I
> having the same problem?  (I don't know anything about
> RMIClassLoader.getClassAnnotation(), which he says delivers 35K bytes
> from server to client in his situation.)
>  
> Thanks,
>  
> Mike Arachtingi 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to