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
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
On Tue, Jul 22 2025, Eli Zaretskii wrote:
[...]
>> So I think we should add something to BYTE_COMPILE_FLAGS to increase
>> gc-cons-percentage; or perhaps increase it in batch-byte-compile.
>
> We could certainly try that; patches welcome.
Here is a one:
[0001-Increase-gc-cons-percentage-when-building-.elc-files.patch (text/x-diff, attachment)]
[Message part 3 (text/plain, inline)]
> P.S. The above benchmark should be repeated with native-compilation,
> IMO.
I repeated it for "make bootstrap" because I don't know how to only
rebuild the lisp directory with native-compilation.
So basically I did:
for percentage in 0.1 0.75 1.5 ; do
/usr/bin/time -o make-$percentage.time make -l3.2 -j4 \
BYTE_COMPILE_EXTRA_FLAGS="--eval '(setq gc-cons-percentage $percentage)'" \
FAST=true -l3.2 -j4 bootstrap
done
The results are:
* for gc-cons-percentage = 0.1:
2331.71user 86.23system 14:38.08elapsed 275%CPU (0avgtext+0avgdata 641880maxresident)k
4432inputs+742056outputs (18major+14952231minor)pagefaults 0swaps
* for gc-cons-percentage = 0.75:
1223.32user 85.96system 8:06.30elapsed 269%CPU (0avgtext+0avgdata 706240maxresident)k
0inputs+742064outputs (2major+15873839minor)pagefaults 0swaps
* for gc-cons-percentage = 1.5:
961.91user 94.57system 6:32.58elapsed 269%CPU (0avgtext+0avgdata 766348maxresident)k
16inputs+742064outputs (0major+18617902minor)pagefaults 0swaps
[BTW, boostrapping the igc branch requires:
1039.27user 181.75system 7:19.31elapsed 277%CPU (0avgtext+0avgdata 929092maxresident)k
38960inputs+682528outputs (8major+27973694minor)pagefaults 0swaps ]
For fun, I also recorded the times for individual compilation processes.
Here a scatter plot of the result:
[elc.svgz (image/svg+xml, attachment)]
[Message part 5 (text/plain, inline)]
Some statistics:
gc-cons-percentage │ variable mean min median max
────────────────────┼───────────────────────────────────────────────
0.1 │ real 1.3452 0.12 0.48 162.52
0.1 │ rssmax 51622.8 42692 45388.0 641880
│
0.75 │ real 0.660551 0.1 0.285 69.69
0.75 │ rssmax 54213.1 43032 47932.0 706240
│
1.5 │ real 0.507625 0.08 0.22 62.93
1.5 │ rssmax 60135.5 43060 55508.0 766348
and here the full tables, if somebody is interested:
[elc-0.1.csv.gz (application/gzip, attachment)]
[elc-0.75.csv.gz (application/gzip, attachment)]
[elc-1.5.csv.gz (application/gzip, attachment)]
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.