[gnu.emacs] Garbage Collecting

kindred@dopey.telesci.UUCP (David L Kindred (Dave)) (09/07/89)

Having used GNU Emacs for a while, and having had the opportunity to
upgrade it from 18.52 to 18.54, and do other various assorted things,
I do not recall ever seeing a discussion of Memory Usage versus
Garbage Collection Frequency versus Garbage Collection Duration.  I
have read that Garbage Collection is linked to CONSing, not memory
availability, but would like to know more about the relationships
between all of the above.  Has anyone with the knowledge needed done a
study to determine the "best" Garbage Collection parameters for any
given environment?  In particular, I'm wondering about the best method
of making it least obtrusive.  Is there any "published" material
available covering this?  I realize that it is not intentional, but
garbage collection seems to occur at the most frustrating moments...

(If it makes any difference, I'm running Emacs 18.54 on a Sun 3/50
with 4 Meg of RAM.  I should have a 8 meg 3/60 or 3/80 by October. I
hope that the extra 4 meg will ease some of my problems.)

							- Dave
--

EMail: kindred@telesci.UUCP (...!princeton!telesci!kindred)
Phone: +1 609 866 1000 x222
Snail: TeleSciences C O Systems, 351 New Albany Rd, Moorestown, NJ 08057-1177

grunwald@foobar.colorado.edu (Dirk Grunwald) (09/08/89)

What is needed is generational garbage collection. With this method,
older, stable objects remain in heaps that don't get GC'd too
often. By GC'ing smaller regions, possibly more often, the GC is
much less obtrusive.

However, I've never seen anyone volunteer to change Emacs to do this.

pcg@thor.cs.aber.ac.uk (Piercarlo Grandi) (09/08/89)

To: 
In article <KINDRED.89Sep6191105@dopey.telesci.UUCP> kindred@dopey.telesci.UUCP (David L Kindred (Dave)) writes:

   Having used GNU Emacs for a while, and having had the opportunity to
   upgrade it from 18.52 to 18.54, and do other various assorted things,
   I do not recall ever seeing a discussion of Memory Usage versus
   Garbage Collection Frequency versus Garbage Collection Duration.

   (If it makes any difference, I'm running Emacs 18.54 on a Sun 3/50
   with 4 Meg of RAM.  I should have a 8 meg 3/60 or 3/80 by October. I
   hope that the extra 4 meg will ease some of my problems.)

I have a 2 meg 386 at home, and since the discs are on my desk, I can
hear the clatter of seeks... It is fairly obvious that in general GNU
programs have *very* poor locality of reference; they seem to be built
under the assumption of infinite *real* memory, not infinite *virtual*
memory.

I think that obviating this, at least for Emacs, is not a big problem,
for somebody that knows well its structure. Garbage collecting GNU emacs
is usually fast enough (CPU wise); what I find really annoying is
the heavvy paging rate between garbage collections...

What about a nice packing collector? or a copying compatctifying one?
Oh, please, please! (plea to RMS for version 19).
--
Piercarlo "Peter" Grandi           | ARPA: pcg%cs.aber.ac.uk@nsfnet-relay.ac.uk
Dept of CS, UCW Aberystwyth        | UUCP: ...!mcvax!ukc!aber-cs!pcg
Penglais, Aberystwyth SY23 3BZ, UK | INET: pcg@cs.aber.ac.uk

nate@hobbes.intel.com (Nate Hess) (09/09/89)

If your primary interest is making gc less obtrusive, then the best
thing to do, probably, is to set the variable `gc-cons-threshold' to
1000000, or some similarly high number.  Emacs will then seldom garbage
collect.  Of course, when it does, it takes a while.  :-)#

--woodstock
-- 
	   "What I like is when you're looking and thinking and looking
	   and thinking...and suddenly you wake up."   - Hobbes

woodstock@hobbes.intel.com   ...!{decwrl|hplabs!oliveb}!intelca!mipos3!nate