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: Ihor Radchenko
Subject: Re: Larger GC thresholds for non-interactive Emacs
Date: Sun, 19 Jun 2022 17:23:11 +0800

Stefan Monnier <monnier@iro.umontreal.ca> writes:

>
>     % grep GC-26227 ./+make-0.1.log | tail -n 10              
>     GC-26227 p=0.1 total=18.8M free=1.9M thresold=1.9M
> ...
>     GC-26227 p=0.1 total=18.8M free=1.8M thresold=1.9M
>     GC-26227 p=0.1 total=145.7M free=32.6M thresold=14.6M
>     GC-26227 p=0.1 total=132.8M free=60.7M thresold=13.3M
>     % grep GC-898 ./+make-1.0.log | tail -n 10              
>     GC-898 p=1.0 total=18.5M free=7.5M thresold=18.5M
> ...
>     GC-898 p=1.0 total=18.8M free=7.3M thresold=18.8M
>     GC-898 p=1.0 total=145.7M free=32.6M thresold=145.7M
>     % 

Now, when I cleared my confusion about the units of gc-cons-percentage,
let me share one thought on the above results.

In the first series of benchamarks with p=0.1 and total=18.8M, free is
roughly equal to threshold.

When we increase the threshold, free increases up to some value, but
that value is limited by the underlying code:
>     GC-26227 p=0.1 total=145.7M free=32.6M thresold=14.6M
>     GC-898 p=1.0 total=145.7M free=32.6M thresold=145.7M

In the above two cases, it appears that 32.6M is required to store all
the transient values, regardless of the threshold.

Hypothesis:

1. When threshold < equilibrium free, we perform redundant GC passes
2. When threshold > equilibrium free, we allocate extra unnecessary
   memory
3. The optimum memory usage/GC frequency happens at free=threshold

Can we test this hypothesis?

Best,
Ihor




reply via email to

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