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

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Sat Jan 17 18:42:34 EST 2004

To elaborate on just this part of the thread:

At Sat, 17 Jan 2004 12:28:21 -0700, Adam Wick wrote:
> (If you'd like some of it: I've found running SirMail, given my email load,
> can become problematic after a few days using the conservative system, and
> stays happily well under 64M under 3m for weeks on end. On some programs, 
> I've found DrScheme itself can become a serious problem after more than a few
> hours of use, whereas I haven't had much of a problem with 3m. My personal
> experience with the web server and handin server is extremely limited, and
> you'd have to ask those people who use these over long time periods.)

The examples above are all thread-intensive programs, which means a lot
of continuations. My experience with the web server is that it does ok
with CGC for long periods under light loads (slow creation of threads),
but it grows quickly under heavy loads (lots of threads), so it's the
same story.

The explanation for this starts with Hans Boehm's POPL'02 paper. Boehm
notes that queues can lead to unbounded growth with CGC. In principle,
the solution is easy: break the chain by zeroing out the pointer that
becomes useless after dequeueing an element.

In MzScheme, one kind of value in particular tends to create queue-like
chains: continuations. In this case, the chain link is a reference to
one continuation (or some other value that leads back to the
continuation) in anoethr continuation's registers or stack.

Tracking down these continuation-to-continuation references and zeroing
them out is difficult at best. The revelant registers or stack
positions tend to be dead already in the source code. We've improved
MzScheme's behavior in the past by finding something relevant to zero,
but this game gets old fast. The 3m conversion avoids the problem
because it has a better approximation of what is actually live in a
continuation.

In short, I believe that our worst problems with CGC are specific to
MzScheme's implementation of continuations and threads. A different
implementation would probably fare better with CGC. Thinking back, I
believe that queue-like chains have shown up for other data structures
(in the GUI system especially), but in those other cases, finding
something to zero has been easy.

More generally, our experience suggests that the question of finding
and correcting queue-like chains is an important part of the
conservative-versus-precise decision.

Matthew



Posted on the users mailing list.