[kaffe] simple comparison of kaffe-gc and boehm-gc

siddharth karandikar siddharth.forums at gmail.com
Mon Sep 5 03:54:56 PDT 2005


The program I used is a very simple program to check the gc performance for 
objects with different life times. To run this program i was using "Linux 
sidd 2.6.8-24-default #1 Wed Oct 6 09:16:23 UTC 2004 i686 athlon i386 
GNU/Linux"

The point i observed here is kaffe-gc was taking more time with initial and 
max heap size of 128M, where boehm-gc worked properly and execution time 
reduced after increasing the heap size initially and then stabilised. 

Program Used
==========

import java.util.*;
public class LongL {
public static void main(String args[]) {
int NUM_OBJECTS = 50;

for(int x = 0 ; x < NUM_OBJECTS ; x++) {
Vector vL = new Vector();


for(int i = 0 ; i < NUM_OBJECTS ; i++) {

Vector v = new Vector();

for(int j=0;j<NUM_OBJECTS;j++) {

Vector vS = new Vector();
for(int k = 0 ; k < NUM_OBJECTS ; k++) {
vS.addElement("s");
}
v.addElement(vS);
}

vL.addElement(v);
}
}

System.out.println("Done.");

}
}


Using kaffe-gc
==========
$ time ~/kaffe-1.1.5-jit3-kaffe-gc/bin/java -Xms32m -Xmx32m LongL
Done. 
real 0m11.205s
user 0m10.543s
sys 0m0.267s

$ time ~/kaffe-1.1.5-jit3-kaffe-gc/bin/java -Xms64m -Xmx64m LongL
Done. 
real 0m10.401s
user 0m9.949s
sys 0m0.247s

$ time ~/kaffe-1.1.5-jit3-kaffe-gc/bin/java -Xms128m -Xmx128m LongL
Done. 
real 0m14.145s
user 0m13.692s
sys 0m0.395s

$ time ~/kaffe-1.1.5-jit3-kaffe-gc/bin/java -Xms256m -Xmx256m LongL
Done. 
real 0m8.378s
user 0m8.006s
sys 0m0.317s


Using boehm-gc
=============
$ time ~/kaffe-1.1.5-jit3-boehm-gc/bin/java -Xms32m -Xmx32m LongL
Done. 
real 0m8.104s
user 0m7.957s
sys 0m0.088s

$ time ~/kaffe-1.1.5-jit3-boehm-gc/bin/java -Xms64m -Xmx64m LongL
Done. 
real 0m7.949s
user 0m7.749s
sys 0m0.106s

$ time ~/kaffe-1.1.5-jit3-boehm-gc/bin/java -Xms128m -Xmx128m LongL
Done. 
real 0m7.402s
user 0m7.097s
sys 0m0.232s

$ time ~/kaffe-1.1.5-jit3-boehm-gc/bin/java -Xms256m -Xmx256m LongL
Done. 
real 0m7.398s
user 0m7.111s
sys 0m0.227s
$ time ~/kaffe-1.1.5-jit3-boehm-gc/bin/java -Xms512m -Xmx512m LongL
Done. 
real 0m7.389s
user 0m7.102s
sys 0m0.229s


-- 
------------------------
~ Siddharth ~
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://kaffe.org/pipermail/kaffe/attachments/20050905/dda6d896/attachment-0005.htm 


More information about the kaffe mailing list