emacs-devel
[Top][All Lists]
Advanced

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

Re: Larger GC thresholds for non-interactive Emacs


From: Alan Mackenzie
Subject: Re: Larger GC thresholds for non-interactive Emacs
Date: Fri, 17 Jun 2022 18:39:31 +0000

Hello, Lars.

On Fri, Jun 17, 2022 at 20:20:48 +0200, Lars Ingebrigtsen wrote:
> Stefan Monnier <monnier@iro.umontreal.ca> writes:

> > Here are the results of a similar test where I tried to avoid the above
> > problem by also removing src/boostrap-emacs (and I also rm'd
> > lisp/loaddefs.el for good measure tho it was probably not a great idea),
> > and I used

> >     BYTE_COMPILE_EXTRA_FLAGS="--eval '(setq gc-cons-percentage $FOO)'":

> > make -j24 FOO=0.1    1338.52s user 60.95s system 1256% cpu 1:51.42 total

> [...]

> > make -j24 FOO=2.0     678.14s user 68.64s system 1044% cpu 1:11.52 total

> Nice!

> > This suggests that for batch jobs maybe we should bump up
> > `gc-cons-percentage` from 0.1 to something like 1.0 or 2.0.

> Yup.  But do you mean in general?  I.e., -batch would set that variable
> to 2.0?  Would there be any likely major repercussions -- i.e., jobs
> that used to run fine would run out of memory?

> As a quick test, I added a (setq gc-cons-percentage 2.0) to startup.el
> here, and a

> git clean -dfx
> time make -j32

> went from 1m29s to 1m4s.

Just as another independent test (as if any were needed), I put

    BYTE_COMPILE_EXTRA_FLAGS = --eval '(setq gc-cons-threshold 50000000)'

into lisp/Makefile.in, and my time for $ make -j17 bootstrap dropped
from 5m52s to 3m35s, a drop of 39%.  Watching the .elc's being built was
noticeably faster, even to the naked eye.  This was a build with native
compilation enabled.

> -- 
> (domestic pets only, the antidote for overdose, milk.)
>    bloggy blog: http://lars.ingebrigtsen.no

-- 
Alan Mackenzie (Nuremberg, Germany).



reply via email to

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