From: Trastabuga
Subject: Trying to reduce SBCL memory usage
Date: 
Message-ID: <1178291406.915494.63820@u30g2000hsc.googlegroups.com>
I am facing a problem I don't really know how to approach.
On my Linux Debian box I am running SBCL of the latest (1.04) revision
and I am really concerned about the big memory usage of the whole
process.
Using the top command I got following info:
  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
 2294 lispu        15   0  884m  96m  16m  S    0.0      38.6
0:46.22       sbcl
which means that my lisp image uses 884MB of virtual memory and 96MB
of physical memory.
My project depends on following packages: (:uffi :cl-gd :zpb-
ttf :hunchentoot :cl-who :s-xml :drakma), sure they depend on other
projects which probably makes it pretty big.
Also, sometimes when I connect to the lisp image (it runs under
detachtty) using slime and modify/evaluate a function I see a lot of
hard drive activity which may take a few seconds, after that the
amount of free memory in the system drops from 90MB to 3MB (after a
few evaluations).
Is it ok for the lisp image to be so big? If there is a memory leak
how could it be found?

Thank you,
Andrew
From: Alex Mizrahi
Subject: Re: Trying to reduce SBCL memory usage
Date: 
Message-ID: <463c53d4$0$90275$14726298@news.sunsite.dk>
(message (Hello 'Trastabuga)
(you :wrote  :on '(4 May 2007 08:10:06 -0700))
(

 T> Is it ok for the lisp image to be so big? If there is a memory leak
 T> how could it be found?

100 MB is not so big nowadays, if you use lotsa libs..
afaik SBCL uses 4-byte chars, so it's not surprising at all..

 T> Also, sometimes when I connect to the lisp image (it runs under
 T> detachtty) using slime and modify/evaluate a function I see a lot of
 T> hard drive activity which may take a few seconds, after that the
 T> amount of free memory in the system drops from 90MB to 3MB (after a
 T> few evaluations).

it's normal behaviour of system with virtual memory. most likely it's 
connected with GC -- typically only a fraction of memory is used, but during 
GC it might need almost all of it.

)
(With-best-regards '(Alex Mizrahi) :aka 'killer_storm)
"I am everything you want and I am everything you need")