[Openmcl-devel] Limiting memory allocation

David L. Rager ragerdl at cs.utexas.edu
Fri Apr 20 19:45:25 UTC 2007


Hi Jared,

You may want to check out the functions here:

http://www.openmcl.org/Doc/index.html#Garbage_002dCollection-Dictionary


In my version of snapshot'd linux64 Openmcl, the heap threshold is 32 meg
(see LISP-HEAP-GC-THRESHOLD and SET-LISP-HEAP-GC-THRESHOLD).  I'm not sure
how it's getting all the way to a gig without collecting.  Perhaps a bug.
Also, you might try modifying the variable returned via gc-retaining-pages
with the function gc-retain-pages.  If these don't work, perhaps requery the
list.

Also maybe of interest to you is the term "egc."  EGC stands for ephemeral
garbage collector.  It's basically a generational GC that usually defaults
to collect around 1 meg, 2 meg, and 4 meg.  You could try making these
numbers smaller with the function (ccl:configure-egc).

Thanks,
David


-----Original Message-----
From: openmcl-devel-bounces at clozure.com
[mailto:openmcl-devel-bounces at clozure.com] On Behalf Of Jared C. Davis
Sent: Friday, April 20, 2007 1:44 PM
To: openmcl-devel at clozure.com
Subject: [Openmcl-devel] Limiting memory allocation

Hi,

Can I somehow instruct OpenMCL to try do a full garbage collection earlier?

I'm using the 070408 linux x86-64 image.  Since I have a dual core
machine, I'd like to run two copies of OpenMCL side by side for a
parallel make.  But I have only 1 GB of physical memory, and OpenMCL
seems to want to use 1 GB before it garbage collects, e.g., I
sometimes see the following message:

;;; Starting full GC,  1102970880 bytes allocated.

But if I have two instances of OpenMCL running (along with other
programs like emacs), then at this point I'm hundreds of megabytes
into my swap space and the system becomes very slow.  So, I think if I
could just get each OpenMCL to limit itself to 300-500 MB of memory, I
might be able to avoid this.

I've tried using some of the command line switches, e.g.,

exec "openmcl" \
   --heap-reserve 131072000 \
   --set-lisp-heap-gc-threshold 524288000 \
   -I "/usr/local/acl2/v3.2h/saved_acl2h.openmcl" \
   -e "(acl2::acl2-default-restart)" $*

But this doesn't seem to have the desired effect.  Maybe I'm using
these switches incorrectly, or I need to run some other commands once
OpenMCL starts up?

Thanks!
   Jared

-- 
Jared C. Davis <jared at cs.utexas.edu>
3600 Greystone Drive #604
Austin, TX 78731
http://www.cs.utexas.edu/users/jared/
_______________________________________________
Openmcl-devel mailing list
Openmcl-devel at clozure.com
http://clozure.com/mailman/listinfo/openmcl-devel




More information about the Openmcl-devel mailing list