unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* memory tken by emacs
@ 2023-02-02  6:36 Samuel Wales
  2023-02-02  9:09 ` Eli Zaretskii
  2023-02-02 22:20 ` Stefan Monnier via Users list for the GNU Emacs text editor
  0 siblings, 2 replies; 9+ messages in thread
From: Samuel Wales @ 2023-02-02  6:36 UTC (permalink / raw)
  To: help-gnu-emacs

my computer is overwhelmed frequenty.  sometimes the biggest memory
user is emacs.

ps -eo pid,\%mem,size,vsize,rss,resident,cmd --sort=size ->  5234 55.2
3226844 3549680 3193108 - emacs --maximize

i could run the profiler for a while to find functions, but is htere
anything ht will show me what modes, buffers, etc. are using memory?
for example, undo-tree, or diff-mode, or something like that?  also,
if i kill a buffer and gc, will it reduce memory?

-- 
The Kafka Pandemic

A blog about science, health, human rights, and misopathy:
https://thekafkapandemic.blogspot.com



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: memory tken by emacs
  2023-02-02  6:36 memory tken by emacs Samuel Wales
@ 2023-02-02  9:09 ` Eli Zaretskii
  2023-02-03 17:17   ` Emanuel Berg
  2023-03-08  4:53   ` Samuel Wales
  2023-02-02 22:20 ` Stefan Monnier via Users list for the GNU Emacs text editor
  1 sibling, 2 replies; 9+ messages in thread
From: Eli Zaretskii @ 2023-02-02  9:09 UTC (permalink / raw)
  To: help-gnu-emacs

> From: Samuel Wales <samologist@gmail.com>
> Date: Wed, 1 Feb 2023 23:36:42 -0700
> 
> my computer is overwhelmed frequenty.  sometimes the biggest memory
> user is emacs.
> 
> ps -eo pid,\%mem,size,vsize,rss,resident,cmd --sort=size ->  5234 55.2
> 3226844 3549680 3193108 - emacs --maximize
> 
> i could run the profiler for a while to find functions, but is htere
> anything ht will show me what modes, buffers, etc. are using memory?
> for example, undo-tree, or diff-mode, or something like that?

If you are using Emacs 28.1 or later, there's "M-x memory-report".
But it doesn't (and cannot) give you details by buffer or by mode.

> also, if i kill a buffer and gc, will it reduce memory?

If it can, it will, yes.



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: memory tken by emacs
  2023-02-02  6:36 memory tken by emacs Samuel Wales
  2023-02-02  9:09 ` Eli Zaretskii
@ 2023-02-02 22:20 ` Stefan Monnier via Users list for the GNU Emacs text editor
  2023-02-03  4:02   ` Samuel Wales
  1 sibling, 1 reply; 9+ messages in thread
From: Stefan Monnier via Users list for the GNU Emacs text editor @ 2023-02-02 22:20 UTC (permalink / raw)
  To: help-gnu-emacs

> ps -eo pid,\%mem,size,vsize,rss,resident,cmd --sort=size ->  5234 55.2
> 3226844 3549680 3193108 - emacs --maximize

Wow, is that 3GB of RSS?
Are you doing anything with this Emacs which could justify using more
than a couple hundred MBs?


        Stefan




^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: memory tken by emacs
  2023-02-02 22:20 ` Stefan Monnier via Users list for the GNU Emacs text editor
@ 2023-02-03  4:02   ` Samuel Wales
  0 siblings, 0 replies; 9+ messages in thread
From: Samuel Wales @ 2023-02-03  4:02 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: help-gnu-emacs

tldr idk.

On 2/2/23, Stefan Monnier via Users list for the GNU Emacs text editor
<help-gnu-emacs@gnu.org> wrote:
>> ps -eo pid,\%mem,size,vsize,rss,resident,cmd --sort=size ->  5234 55.2
>> 3226844 3549680 3193108 - emacs --maximize
>
> Wow, is that 3GB of RSS?

i don't really understand memory terms in linux.  but emacs is using
half of memory so it could be.

> Are you doing anything with this Emacs which could justify

not really.  i don't know why emacs started getting slower and
capacity using.  there is one thing i do, which is to enable undo-tree
in a derived mode of diff-mode, and this is quite useful, but keeps a
history as long as i don't... kill the buffer?
but i kill the buffer and it is still capacity using.  maybe i set gc
or undo vars wrong at one point?  idk.  i'm just a normal emacs user
[that was a joke, i don't think there is such a thing].  i use org and
magit and shell.  i long ago set shell output truncation to a level
that was reasonable on an older, less memory, proabalby slower cpu
computer that performed better [but had 4 cores not 2].  idr if i ever
messed with messages buffer truncation or if it is possible.

it is true that as of a while back, my whole computer got kinda bad
and slow and running out of memory.  manifesting in slow emacs, slow
firefox, and slow rsync.  but idk if that is related or not.  it's
kind of confusing and complex.

i had at the time 2000+ firefox tabs, but still slow without that....
new slow drives.  and i attempted to reduce the impact of rsync which
was pretty fast and did not make the system laggy, at least on the old
drives tht worked ok, with all those things like nocache ionice -c3
nice chrt --idle 0 and not knowing which combinations to use.  i get
40min transfers instead of 6min.  and laggy everything on top of that.
but too many variables.  too many things changed and for health
reasons i don't have it in me to be systematic. but diagostic tools
for emacs imghtb e nice.  using an old emacs.


-- 
The Kafka Pandemic

A blog about science, health, human rights, and misopathy:
https://thekafkapandemic.blogspot.com



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: memory tken by emacs
  2023-02-02  9:09 ` Eli Zaretskii
@ 2023-02-03 17:17   ` Emanuel Berg
  2023-02-09 22:58     ` Samuel Wales
  2023-03-08  4:53   ` Samuel Wales
  1 sibling, 1 reply; 9+ messages in thread
From: Emanuel Berg @ 2023-02-03 17:17 UTC (permalink / raw)
  To: help-gnu-emacs

Eli Zaretskii wrote:

> If you are using Emacs 28.1 or later, there's
> "M-x memory-report".

Cool feature!

Maybe one can make draw it somehow and/or make it interactive?

-- 
underground experts united
https://dataswamp.org/~incal




^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: memory tken by emacs
  2023-02-03 17:17   ` Emanuel Berg
@ 2023-02-09 22:58     ` Samuel Wales
  2023-02-14  3:57       ` Samuel Wales
  0 siblings, 1 reply; 9+ messages in thread
From: Samuel Wales @ 2023-02-09 22:58 UTC (permalink / raw)
  To: help-gnu-emacs

i do nto know what is taking up a quarter of system memory in emacs.
it is unlikely to be the stuff i mentioned.

On 2/3/23, Emanuel Berg <incal@dataswamp.org> wrote:
> Eli Zaretskii wrote:
>
>> If you are using Emacs 28.1 or later, there's
>> "M-x memory-report".
>
> Cool feature!
>
> Maybe one can make draw it somehow and/or make it interactive?
>
> --
> underground experts united
> https://dataswamp.org/~incal
>
>
>


-- 
The Kafka Pandemic

A blog about science, health, human rights, and misopathy:
https://thekafkapandemic.blogspot.com



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: memory tken by emacs
  2023-02-09 22:58     ` Samuel Wales
@ 2023-02-14  3:57       ` Samuel Wales
  0 siblings, 0 replies; 9+ messages in thread
From: Samuel Wales @ 2023-02-14  3:57 UTC (permalink / raw)
  To: help-gnu-emacs

[because i run without diff mode and don't do much in comint, and
don't undo much and it still takes up a lo of memory.  will take me a
while to upgrade from version to file a bug.]

On 2/9/23, Samuel Wales <samologist@gmail.com> wrote:
> i do nto know what is taking up a quarter of system memory in emacs.
> it is unlikely to be the stuff i mentioned.
>
> On 2/3/23, Emanuel Berg <incal@dataswamp.org> wrote:
>> Eli Zaretskii wrote:
>>
>>> If you are using Emacs 28.1 or later, there's
>>> "M-x memory-report".
>>
>> Cool feature!
>>
>> Maybe one can make draw it somehow and/or make it interactive?
>>
>> --
>> underground experts united
>> https://dataswamp.org/~incal
>>
>>
>>
>
>
> --
> The Kafka Pandemic
>
> A blog about science, health, human rights, and misopathy:
> https://thekafkapandemic.blogspot.com
>


-- 
The Kafka Pandemic

A blog about science, health, human rights, and misopathy:
https://thekafkapandemic.blogspot.com



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: memory tken by emacs
  2023-02-02  9:09 ` Eli Zaretskii
  2023-02-03 17:17   ` Emanuel Berg
@ 2023-03-08  4:53   ` Samuel Wales
  2023-03-10 16:23     ` Stefan Monnier via Users list for the GNU Emacs text editor
  1 sibling, 1 reply; 9+ messages in thread
From: Samuel Wales @ 2023-03-08  4:53 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: help-gnu-emacs

On 2/2/23, Eli Zaretskii <eliz@gnu.org> wrote:
>> also, if i kill a buffer and gc, will it reduce memory?
>
> If it can, it will, yes.

i've killed all buffers using ibuffer and no difference.  i forgot to
gc, however.  will have to try again i guess.

-- 
The Kafka Pandemic

A blog about science, health, human rights, and misopathy:
https://thekafkapandemic.blogspot.com



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: memory tken by emacs
  2023-03-08  4:53   ` Samuel Wales
@ 2023-03-10 16:23     ` Stefan Monnier via Users list for the GNU Emacs text editor
  0 siblings, 0 replies; 9+ messages in thread
From: Stefan Monnier via Users list for the GNU Emacs text editor @ 2023-03-10 16:23 UTC (permalink / raw)
  To: help-gnu-emacs

>>> also, if i kill a buffer and gc, will it reduce memory?
>> If it can, it will, yes.
> i've killed all buffers using ibuffer and no difference.

It's considered normal and acceptable that memory allocated to a process
is returned to the OS only when the process dies.

Some efforts are made to return memory to the OS when possible, but
less common than most users (and developers) expect.


        Stefan




^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2023-03-10 16:23 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-02  6:36 memory tken by emacs Samuel Wales
2023-02-02  9:09 ` Eli Zaretskii
2023-02-03 17:17   ` Emanuel Berg
2023-02-09 22:58     ` Samuel Wales
2023-02-14  3:57       ` Samuel Wales
2023-03-08  4:53   ` Samuel Wales
2023-03-10 16:23     ` Stefan Monnier via Users list for the GNU Emacs text editor
2023-02-02 22:20 ` Stefan Monnier via Users list for the GNU Emacs text editor
2023-02-03  4:02   ` Samuel Wales

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).