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"<br>
<br>
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. <br>
<br>
Program Used<br>
==========<br>
<br clear="all">import java.util.*;<br>
public class LongL {<br>
public static void main(String args[]) {<br>
int NUM_OBJECTS = 50;<br>
<br>
for(int x = 0 ; x < NUM_OBJECTS ; x++) {<br>
Vector vL = new Vector();<br>
<br>
<br>
for(int i = 0 ; i < NUM_OBJECTS ; i++) {<br>
<br>
Vector v = new Vector();<br>
<br>
for(int j=0;j<NUM_OBJECTS;j++) {<br>
<br>
Vector vS = new Vector();<br>
for(int k = 0 ; k < NUM_OBJECTS ; k++) {<br>
vS.addElement("s");<br>
}<br>
v.addElement(vS);<br>
}<br>
<br>
vL.addElement(v);<br>
}<br>
}<br>
<br>
System.out.println("Done.");<br>
<br>
}<br>
}<br>
<br>
<br>
Using kaffe-gc<br>
==========<br>
$ time ~/kaffe-1.1.5-jit3-kaffe-gc/bin/java -Xms32m -Xmx32m LongL<br>
Done.
<br>
real 0m11.205s<br>
user 0m10.543s<br>
sys 0m0.267s<br>
<br>
$ time ~/kaffe-1.1.5-jit3-kaffe-gc/bin/java -Xms64m -Xmx64m LongL<br>
Done.
<br>
real 0m10.401s<br>
user 0m9.949s<br>
sys 0m0.247s<br>
<br>
$ time ~/kaffe-1.1.5-jit3-kaffe-gc/bin/java -Xms128m -Xmx128m LongL<br>
Done. <br>
real 0m14.145s<br>
user 0m13.692s<br>
sys 0m0.395s<br>
<br>
$ time ~/kaffe-1.1.5-jit3-kaffe-gc/bin/java -Xms256m -Xmx256m LongL<br>
Done. <br>
real 0m8.378s<br>
user 0m8.006s<br>
sys 0m0.317s<br>
<br>
<br>
Using boehm-gc<br>
=============<br>
$ time ~/kaffe-1.1.5-jit3-boehm-gc/bin/java -Xms32m -Xmx32m LongL<br>
Done. <br>
real 0m8.104s<br>
user 0m7.957s<br>
sys 0m0.088s<br>
<br>
$ time ~/kaffe-1.1.5-jit3-boehm-gc/bin/java -Xms64m -Xmx64m LongL<br>
Done. <br>
real 0m7.949s<br>
user 0m7.749s<br>
sys 0m0.106s<br>
<br>
$ time ~/kaffe-1.1.5-jit3-boehm-gc/bin/java -Xms128m -Xmx128m LongL<br>
Done. <br>
real 0m7.402s<br>
user 0m7.097s<br>
sys 0m0.232s<br>
<br>
$ time ~/kaffe-1.1.5-jit3-boehm-gc/bin/java -Xms256m -Xmx256m LongL<br>
Done. <br>
real 0m7.398s<br>
user 0m7.111s<br>
sys 0m0.227s<br>
$ time ~/kaffe-1.1.5-jit3-boehm-gc/bin/java -Xms512m -Xmx512m LongL<br>
Done. <br>
real 0m7.389s<br>
user 0m7.102s<br>
sys 0m0.229s<br>
<br>
<br>
-- <br>------------------------<br>~ Siddharth ~