GNU bug report logs -
#79074
31.0.50; Increase gc-cons-percentage in Makefiles
Previous Next
Reported by: Helmut Eller <eller.helmut <at> gmail.com>
Date: Tue, 22 Jul 2025 15:28:02 UTC
Severity: normal
Found in version 31.0.50
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
Message #29 received at 79074 <at> debbugs.gnu.org (full text, mbox):
On Sat, Jul 26 2025, Stefan Monnier wrote:
>> It seems that the default value for gc-cons-percentage (10%) is very
>> conservative and hurts performance.
>
> It is definitely very conservative. But it's used only in
> interactive mode, not in batch mode:
>
> % src/emacs -Q --batch --eval '(message "%S" gc-cons-percentage)'
> 1.0
> %
Ah, I didn't know that; but it makes sense. Which means that the bug
can be closed.
> FWIW, in my interactive mode, I set it to 0.5 so as to try and reduce
> the occurrences of GC while I use Emacs, and then have an idle timer
> that tries to run Emacs during pauses so as to recover some of the
> benefits of more frequent GCs (and to try and avoid running GCs in the
> middle of a command):
>
> Here are the stats for this Gnus process:
>
> M-x gc--opportunistic-score RET
> ((jit 1 0 0) (opportunistic-gcs . 2744) (cmd 104 11 28) (earlier-gcs . 69) (noncmd 18 6 16) (commands . 369311))
>
> IOW, the GC ran 2744 times during idle time, it ran 132 times during
> a command (104 of which were "single-run", i.e. a single GC in that
> command, while the other 28 were spread over only 11 commands, so those
> are GCs that are hard to avoid bby delaying the GC to idle time because
> the commands just use a lot of memory), it ran 34 times during a "non
> command" (process filters? timers?) and it ran once during jit-lock.
> That was during the execution of 369311 commands.
I suppose you collect this data in pre/post-command-hooks?
Helmut
This bug report was last modified 19 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.