This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Native RMI optimization


Hi all, 

Trying to make GCJ-compiled native RMI to run faster than Java RMI for
the last couple of days, but the result is
rather discouraging. Would somebody help me out here? 

My understanding of GCJ-compiled native RMI is that it should run faster
than Java RMI. Having said that, I did a test to see the speed of pure
RMI calls. By pure, I mean client calls a empty remote method. If I
measure the time in between, this should give me the RMI call time,
right? Here is a set of results I got (I have also attached my source
code and shell script with this email): 

Numofcalls	 Java RMI(ms)	Native RMI(ms)
300.0   	    142		172     
400.0   	    235		77     
500.0   	    338		112     
1000.0  	    661		189     
2000.0  	    1111		530    
3000.0  	    1592		908     
4000.0  	    1782    	1216    
5000.0  	    1776    	1508    
10000.0 	    3083    	2933    
15000.0 	    4268    	4404    
20000.0 	    5309    	5874    
25000.0 	    6603    	7386    
30000.0 	    7311    	8775    
35000.0 	    9277		10343   
40000.0 	    10638   	11751   
45000.0 	    11575   	13490   
50000.0 	    13362   	14652  
55000.0 	    14692   	16106   
100000.0        26454   	29374   

Oddly enough, when the number of calls are small, the native rmi is
faster than java rmi, but when the number grows bigger, it actually
becomes slower. Any ideas why? I know GCJ version of RMI has not been a
focus of the development, would this be the reason? Or is it something
to do with my code? 

In my implementation, O3 is used for the compile-time optimization (see
my shell script), and there is no thread or huge amount of objects in
the code. ( the time is measured using Sun hotspot 1.5 and GCJ 4.2)

Thank you very much
Rui  




Attachment: nativermi.rar
Description: nativermi.rar


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]