help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: garbage collecting! How to expand physical-mem used?


From: Pascal Bourguignon
Subject: Re: garbage collecting! How to expand physical-mem used?
Date: 27 Jul 2004 14:28:14 +0200
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3

address@hidden (David Combs) writes:

> garbage collecting!  How to expand physical-mem used?
> 
> 
> 
> 
> My god, does my emacs thrash!  (I have it typing out whenever a
> gc happens).
> 
> (I keep a *huge* *Buffer List*, .emacs.desktop, etc)
> 
> Anyway, while doing an ediff-buffers, the thrashing was really
> heavy.  I wondered if I perhaps had lots of physical-memory
> left unused on the computer -- so, while in one window ("frame",
> I guess) running emacs thrashing, in another dtterm I did a
> vmstat 2, and here it is.

Oh! You're not using Linux...  I really feel that Linux vm is much
much better than mach or *bsd  vm!


> Looks to me that although emacs is thrashing all to beat hell,
> the computer itself is not.   (Do I read the vmstat stuff correctly?)
> 
> If so, the questions is, how to get emacs to grab a larger working
> set (or whatever it's called -- more physical memory).
> 
> Any ideas? 

Well, I don't know about mach or *bsd, but on Linux you could wire
pages for emacs (you'd need to patch emacs' sources, and at least
start it suid root).

Anyway, that would work against you given the good job the OS does.

> Here's the vmstat:
> kthr      memory            page            disk          faults      cpu
> 0 0 0 902088 135560  0   0  0  0  0  0  0  0  0  0  0  404  405  236  1  0 99

Well, your problem is not thrashing!  You've got a minimal number of
faults, and no pagein/pageout.  On the other hand, your CPU is busy.

I'd say that this is not a problem of working set or physical memory,
but merely that of garbage collecting.  Increasing available memory
would only worsen the problem, when garbage collection will occur. On
the other hand, it would occur less often. Perhaps the solution would
be to decrease the garbage collecting threshold, collect more often
but collect less (hence, hang the user less, perhaps so little that
it's imperceptible).

You should check the garbage collection chapter of elisp info.


Oops, I realize that you said garbage collecting first.  But that's
what you get for saying "thrash" when it's not:

thrash
       5: move data into and out of core rather than performing useful
          computation; "The system is thrashing again!"


-- 
__Pascal Bourguignon__                     http://www.informatimago.com/

There is no worse tyranny than to force a man to pay for what he does not
want merely because you think it would be good for him. -- Robert Heinlein


reply via email to

[Prev in Thread] Current Thread [Next in Thread]