[plt-scheme] 3m defaults to --enable-account

From: Adam Wick (awick at cs.utah.edu)
Date: Sat Jan 17 12:59:20 EST 2004

At 17 Jan 2004 02:21:57 -0500, Jim Blandy wrote:
> That's not quite why I was asking.  I've had the precise
> vs. conservative debate going on in my head for many years now, and I
> was hoping you folks' attack on the question might help clarify things
> for me.

The largest problem with conservative collection is that it leaks. 
Conservative collectors, after all, are conservatively guessing what is
and isn't a pointer, and occasionally guess wrong. For relatively short
running applications (like DrScheme in many instances), the slow memory
leak doesn't create that much of a problem. In longer running programs
(the web server, the handin server, some uses of the email program), this
leak can become prohibitive. They will slowly grow until they've taken 
up all your physical memory, at which point they'll starting swapping and
finally crash because they're out of memory. This is, obviously, a major
problem. (I should note that some users of DrScheme may have noticed this
behavior, also, it's just generally not as prevalent)

The largest problem with precise collection, right now, is that it requires
a lot of work to backport existing systems to it, and it's a bit slower 
(largely due to this additional work). Precise collectors require knowledge
of what is and isn't a pointer in both the heap and the stack. Giving it
knowledge of the former is tedious, giving knowledge of the latter requires
manipulation of the source code to pass this information to the runtime as
the program runs. I'm currently working on all these problems in an attempt
to make this conversion both easier and faster.

Precise collection also enables useful add-ons, like memory accounting
(Memory accounting allows a program to constrain the memory use of its
subtasks). I'm hoping to eventually, with Robby, to create a heap 
visualization / debugging tool, to help programmers understand the memory
use of their programs. Neither of these is easy (or particularly useful) 
to do using conservative collection.

Currently, PLT distributes both conservative (e.g., DrScheme) and precise 
(e.g., DrScheme3m) variants. Most internal uses (that I know of) of the
web server and handin server use the 3m variant, and at least three of 
the mail program users use SirMail3m instead of SirMail, due to leak 
problems. DrScheme is generally not used in its 3m variant except by those
of us who develop 3m. This last is partially due to the performance hit,
which I'm working on at the moment. 

My understanding is that it is the eventual goal to move entirely away
from conservative collection, as soon as 3m becomes a bit more stable 
(I should note that it's very stable in CVS right now; I use 3m for 
everything, including writing this email) and some of the performance 
problems are alleviated. The benefit in both memory footprint
and additional tools are enormous, and very hard to ignore.


Posted on the users mailing list.