[Openmcl-devel] GC aspects, tuning, behavior

Jon S. Anthony j-anthony at comcast.net
Thu Jun 25 13:53:35 PDT 2009


This will likely be a few exchanges...

As part of my ongoing porting/open sourcing the graph store/semantic
engine system I have developed I am now educating myself on various
details of CCLs GC.  This is to enable understanding the basic behavior
for various possible tuning scenarios in different circumstances. I have
a pretty good grip on various details of ACL's GC when originally
looking into this sort of stuff, but (being implementation dependent - a
good thing here...) CCL's is different.

If you have a bunch of objects that will be allocated up front for some
processing, and you know that these will basically be around for the
life of the program (more or less), it can be useful to just allocate
them from the start in old space.  In ACL you can do this by setting the
generation-spread to 0 and tenure-limit to nil.  Basically this means
new things have no generations to move through - just go directly to old
space - and inhibit GC (tenure "unlimited" amount until next trigger).
Of course, you also need to request enough old space up front.

CCL's GC has three basic generations for new space allocations: young,
medium, old.  I don't think old here is true old space, but simply the
oldest new space generation before things get tenured to old space.  But
I could be wrong, but assuming I'm not,

(lisp-heap-gc-threshold new-threshold) should basically do the job of
requesting enough space, assuming you can request a full GC.

Is there a means of requesting a full GC?  ccl::freeze does this, but
with the (undoubtedly useful as times) side effect of pinning everything
left alive as non relocatable.  That's a very neat feature, but is
primary reason for freeze - not the full GC it also does.

Next, if you set the generation 0-2 sizes all to 0, would this indicate
to the GC that all new things are just immediately placed in old space?
(like setting generation-spread to 0 in ACL).  I'm not sure about this
one, especially as the documentation says that whatever is requested is
rounded up to a multiple of 64KB (of course 0 is such a multiple,

Along with this - are there multiple old spaces, and if so do they
behave analogous to the generations in new space (ACL does something
like this - it may not even make sense for CCL's GC but I thought I'd

Let's start with this and see what happens :-)

Thanks in advance for any info!


More information about the Openmcl-devel mailing list