* How to see where emacs memory goes to
@ 2005-06-29 10:06 Joakim Verona
2005-06-29 16:37 ` Stefan Monnier
0 siblings, 1 reply; 2+ messages in thread
From: Joakim Verona @ 2005-06-29 10:06 UTC (permalink / raw
Hello,
My emacs currently consumes 256Mb virtual, and 125Mb resident.
Its also fairly slow. This happens a lot with my usage pattern.
Im trying to get a feel for where the memory consumption and slowness
occur, and Im looking for techniques. Any hints would be apreciated.
I currently look at these things:
- m-x garbage-collect to get a baseline
- how large the buffers are, including "hidden" ones
- looking at the number of overlays in certain buffers.
None of these factors seem to come even close to the numbers I get.
Currently it seems ERC is causing a lot of the slowness, if not the
memory consumption.
A plain emaccs -q does of course run fast on my system.
--
Joakim Verona
www.verona.se
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: How to see where emacs memory goes to
2005-06-29 10:06 How to see where emacs memory goes to Joakim Verona
@ 2005-06-29 16:37 ` Stefan Monnier
0 siblings, 0 replies; 2+ messages in thread
From: Stefan Monnier @ 2005-06-29 16:37 UTC (permalink / raw
Cc: emacs-devel
> My emacs currently consumes 256Mb virtual, and 125Mb resident.
> Its also fairly slow. This happens a lot with my usage pattern.
> Im trying to get a feel for where the memory consumption and slowness
> occur, and Im looking for techniques. Any hints would be apreciated.
> I currently look at these things:
> - m-x garbage-collect to get a baseline
> - how large the buffers are, including "hidden" ones
> - looking at the number of overlays in certain buffers.
> None of these factors seem to come even close to the numbers I get.
You can google for memory-usage.el which basially analyses the output of
garbage-collect and a few more things to give you some info, but it's
probably not going to help you much (it doesn't give you much more info
than garbage-collect, it's just more readable).
I think it would be helpful to try and come up with some better way to track
down such problems, but it's a difficult subject. One way I can think of is
that in alloc.c we could change mark_object to keep a running count of
the amount of live-memory marked. Then we could provide a command like
(memory-footprint &rest OBJECTS) which would return the amount of live
memory that would be dead if it weren't for OBJECTS. It could be
implemented as follows:
- set the mark bit on all OBJECTS
- go through the complete normal mark phase
- set live_memory_count back to 0 and clear the mark bit on OBJECTS
- call mark_object on all OBJECTS
- finish the GC by calling ther sweep phase
- return live_memory_count.
> Currently it seems ERC is causing a lot of the slowness, if not the
> memory consumption.
Try to kill buffers one by one, and watch how the memory-usage change with
each kill.
Stefan
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-06-29 16:37 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-06-29 10:06 How to see where emacs memory goes to Joakim Verona
2005-06-29 16:37 ` Stefan Monnier
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.