[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Indentation and gc
From: |
Ihor Radchenko |
Subject: |
Re: Indentation and gc |
Date: |
Sun, 12 Mar 2023 14:20:33 +0000 |
Eli Zaretskii <eliz@gnu.org> writes:
> I'm talking about basis for the 0.7% figure.
I used 0.7%*RAM because total RAM is the only reasonable metrics. What
else can we use to avoid memory over-consumption on low-end machines?
Of course, I used implicit assumption that memory usage will scale with
gc-cons-threshold linearly. IMHO, it is a safe assumption - the real
memory usage increase is slower than linear. For example, see my Emacs
loading data for different threshold values:
| gc-cons-threshold | memory-limit | gcs-done | gc-elapsed | gc time |
| 1Mb | 523704 | 394 | 25.809423617 | 0.065506151 |
| 2Mb | +9624 | 210 | 13.41456755 | 0.063878893 |
| 4Mb | +1224 | 109 | 6.400488833 | 0.058720081 |
| 8Mb | +3164 | 63 | 3.223383144 | 0.051164812 |
| 16Mb | +5532 | 37 | 1.757097776 | 0.047489129 |
| 32Mb | +20264 | 25 | 0.995694149 | 0.039827766 |
| 64Mb | +59860 | 19 | 0.624039941 | 0.032844207 |
| 128Mb | +115356 | 16 | 0.42626893 | 0.026641808 |
| 256Mb | +171176 | 14 | 0.277912281 | 0.019850877 |
| 512Mb | +332148 | 12 | 0.122461442 | 0.010205120 |
Also, see the attached graph.
benchmark-gc.png
Description: PNG image
The 0.7% is to ensure safe 800kb lower bound on low-end computers.
> Anyway, how about if you try running with the threshold you think we
> should adopt, and report back after a month or so, say?
I am using 250Mb threshold for the last 3 years or so.
GCs are sometimes noticeable, but not annoying:
- gc-elapsed 297 sec / gcs-done 290 -> ~1 sec per GC
- Emacs uptime 2 days 5 hours 21 minutes -> 1 GC per 10 minutes
- memory-limit 6,518,516, stable
37x from Emacs -Q memory-limit
10x from Emacs loading with my init.el
--
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>
- Re: Indentation and gc, (continued)
- Re: Indentation and gc, Dr. Arne Babenhauserheide, 2023/03/10
- Re: Indentation and gc, Eli Zaretskii, 2023/03/11
- Re: Indentation and gc, Dr. Arne Babenhauserheide, 2023/03/11
- Re: Indentation and gc, Eli Zaretskii, 2023/03/11
- Re: Indentation and gc, Dr. Arne Babenhauserheide, 2023/03/11
- Re: Indentation and gc, Eli Zaretskii, 2023/03/11
- Re: Indentation and gc, Ihor Radchenko, 2023/03/11
- Re: Indentation and gc, Eli Zaretskii, 2023/03/11
- Re: Indentation and gc, Ihor Radchenko, 2023/03/11
- Re: Indentation and gc, Eli Zaretskii, 2023/03/11
- Re: Indentation and gc,
Ihor Radchenko <=
- Re: Indentation and gc, Eli Zaretskii, 2023/03/12
- Re: Indentation and gc, Ihor Radchenko, 2023/03/12
- Re: Indentation and gc, Eli Zaretskii, 2023/03/12
- Re: Indentation and gc, Ihor Radchenko, 2023/03/13
- Re: Indentation and gc, Eli Zaretskii, 2023/03/13
- Re: Indentation and gc, Ihor Radchenko, 2023/03/13
- Re: Indentation and gc, Eli Zaretskii, 2023/03/13
- Re: Indentation and gc, Ihor Radchenko, 2023/03/13
- Re: Indentation and gc, Eli Zaretskii, 2023/03/14
- Re: Indentation and gc, Ihor Radchenko, 2023/03/15