emacs-devel
[Top][All Lists]
Advanced

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

Re: Emacs memory management and sluggishness


From: Eli Zaretskii
Subject: Re: Emacs memory management and sluggishness
Date: Sat, 27 Jul 2019 16:20:06 +0300

> From: Óscar Fuentes <address@hidden>
> Cc: address@hidden
> Date: Sat, 27 Jul 2019 14:36:25 +0200
> 
> > Is there any correlation between the lag and the GC cycles?  (Turn on
> > garbage-collection-messages to see.)
> 
> Ok. Too bad that the gc messages are not appended to *Messages*.
> 
> Indeed, the lag is caused by gc.
> 
> > If it does, then there's only
> > one problem to investigate: why you have frequent GC cycles.
> >
> > And what is your value of gc-cons-threshold?
> 
> (setq gc-cons-threshold (* 20 1000 1000))
> 
> setting it to (* 2 1000 1000)) shortens the gc pauses, but I have the
> impression that they occur with the same frecuency.

OK, so it's one down, one to go; and I guess you should consider
lowering the threshold.

> > Having said all that, it isn't clear to me that an RSS of 1.1 GB per
> > se is something exceptional in a long-running session.  E.g., the
> > Emacs 26.2.90 session where I'm typing this, which is running for 44
> > days, shows an RSS of 360 MB with VM Size of 514 MB, and this is a
> > 32-bit build of Emacs --with-wide-int.  So your 1.1 GB is not
> > necessarily a sign of a problem.
> 
> Until now my experience was similar. Emacs memory usage increased
> steadily to about 400 MB but then it stayed there. This is the first time
> that I see it over 1 GB. The largest memory usage I observed until now
> was 700 MB, but that was visiting very large PDF files and navigating
> through many pages.
> 
> Since my previous message RSS increased 30 MB.

So I guess we have a memory leak somewhere.  Not sure if we have good
ways of finding them.  I think I'd suggest to update to the latest
master, and then track your memory footprint, waiting for the problem
to happen and taking notes of what features you invoke.  Once the
problem happens again, it would be good to know which features were
activated and which commands invoked since the last checkpoint, so we
could look into what these features/commands do.



reply via email to

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