emacs-devel
[Top][All Lists]
Advanced

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

Re: Garbage collector: is 800kb a good default?


From: Stefan Monnier
Subject: Re: Garbage collector: is 800kb a good default?
Date: Thu, 09 Apr 2020 14:48:57 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

>> (2) you seem to ignore the increased memory pressure on the rest of
>> the system from the growing memory footprint of Emacs.  On GNU/Linux,
>> Emacs doesn't really return malloc'ed memory to the system, so once
>> the memory footprint grows, it more or less stays that way even after GC.

I'm personally not too worried about that (I don't run much more than
Emacs on my machines), but a high GC threshold tends to lead to a large
heap indeed and the problem with it (for me) is that it tends to make
the GC yet slower (to which the naive reaction would be to increase the
threshold yet further to make GC even less frequent) and it can also
slow down the non-GC execution by increasing pressure on the memory
hierarchy (using more VM pages and more cache lines, reducing
effectiveness of the CPU's prefetcher) because the heap is more
sparsely populated.

This is not documented with precise measurements, sadly.
So it's far from clear how much is too much.


        Stefan




reply via email to

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