James E Keenan wrote:

Last night bacek was able to devote some attention to this problem. He
pointed to a particular line of code recently merged in from the
gc_massacre branch and asked me to make a manual change:

$ svn diff
Index: src/gc/gc_ms2.c
===================================================================
--- src/gc/gc_ms2.c (revision 49323)
+++ src/gc/gc_ms2.c (working copy)
@@ -623,7 +623,8 @@

/* Collect every 256M allocated. */
/* Hardcode for now. Will be configured via CLI */
- self->gc_threshold = 256 * 1024 * 1024;
+/* self->gc_threshold = 256 * 1024 * 1024; */
+ self->gc_threshold = 64 * 1024 * 1024;
}
interp->gc_sys->gc_private = self;


256M happens to be amount of Physical Memory reported by 'top' for this
machine. Changing the gc_threshold from 256M to 64M did enable 'make
test' to run completely (including t/compilers/opsc/*.t) and PASS in
about 19 minutes. So the value of the gc_threshold does have a
significant impact on whether parrot will run (in any meaningful sense)
on a particular machine.


I decided to extend this experiment by further decreasing the value assigned to self->gc_threshold by another factor of 4:

Index: src/gc/gc_ms2.c
===================================================================
--- src/gc/gc_ms2.c     (revision 49339)
+++ src/gc/gc_ms2.c     (working copy)
@@ -623,7 +623,9 @@

         /* Collect every 256M allocated. */
         /* Hardcode for now. Will be configured via CLI */
-        self->gc_threshold = 256 * 1024 * 1024;
+/*        self->gc_threshold = 256 * 1024 * 1024; */
+/*        self->gc_threshold = 64 * 1024 * 1024; */
+        self->gc_threshold = 16 * 1024 * 1024;
     }
     interp->gc_sys->gc_private = self;

With this setting, 'make' completed in 11:40 (versus 12:20 with setting of 64M), the tests in t/compilers/opsc/*.t took 6:05 (versus something over 7 minutes; I didn't record exact value), and 'make test' as a whole took 15:28 (versus something in the 19-minute) range. This suggests that on this low-physical-memory box, I get better performance the *lower* I set the GC threshold.

Thank you very much.
kid51

_______________________________________________
http://lists.parrot.org/mailman/listinfo/parrot-dev

Reply via email to