Re: SBCL Memory Tuning



On Jun 16, 7:15 pm, Robert Uhl <eadmun...@xxxxxxxxxxxxxxx> wrote:
Anyone have any advice or tools for examining SBCL's memory usage?

I think pmap would be of interest for you, e.g.:

ondrej@snowcrash:~$ pmap `pidof sbcl`
5874: sbcl
01000000 4K rwx-- /usr/local/lib/sbcl/sbcl.core
01001000 40952K rwx-- [ anon ]
05000000 4K rwx-- /usr/local/lib/sbcl/sbcl.core
05001000 49144K rwx-- [ anon ]
...
b8000000 8K rwx-- /lib/ld-2.5.so
bffeb000 84K rwx-- [ stack ]
ffffe000 4K r-x-- [ anon ]
total 885248K

But as stated above, you usually don't have to worry about this
overcommitting scheme. (Almost) all memory pages are allocated with
MAP_NORESERVE flag and application "claims" space upon writing to
them. Or get a SIGSEGV, when low on free memory.

One issue, where this matters, is when you have limited virtual memory
usage by some means (e.g. RLIMIT) to a low value, say 256MB. In this
scenario SBCL won't succeed to "allocate" desired memory regions and
will fail to start (at least, this is what happens on Linux).
Depending on circumstances, you could get away with setting --dynamic-
space-usage option to some low value, but more likely, you'd have to
resort to tampering with address space layout in src/compiler/*/
parms.lisp and recompiling SBCL.

This file can also give you an insight on pmap output (look for
various -space-start, -space-end constants).

.



Relevant Pages

  • Re: SBCL performance on OS X
    ... > than C at allocating memory. ... > OpenMCL on the powerbook is an order of magnitude slower than SBCL ... comparison with the lisp implementation of your experiment terribly ... allocate an extra two-word structure to store it in, ...
    (comp.lang.lisp)
  • Re: SBCL performance on OS X
    ... > program that just gobbles up memory until the Lisp process dies. ... between the speed of SBCL on an x86 and on a powerpc. ... garbage collection time is proportional to ... If you want to allocate memory ...
    (comp.lang.lisp)
  • Re: Trying to reduce SBCL memory usage
    ... you can allocate more memory than ... Why SBCL is handling its memory like that I am not entirely sure, ...
    (comp.lang.lisp)
  • Re: memory problems
    ... I will start a new discussion on the SBCL mailing lisp as advised, ... called several times while memory increases, but it looks like it is ... If you are running out of heap, ...
    (comp.lang.lisp)
  • Re: Reasons to choose CLISP over other free implementations
    ... Fast CLOS instantiations. ... Better memory management. ... SBCL tends to do not return ... Sorely missed in CLisp: Multithreading. ...
    (comp.lang.lisp)