Subject: bug#75672: closed (Re: bug#75672: 31.0.50; scratch/igc memory usage/collection issues)

From: [email-masked] (GNU bug Tracking System)
Date: Sun, 02 Mar 2025 18:39:02 +0000

Your bug report

#75672: 31.0.50; scratch/igc memory usage/collection issues

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
75672: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=75672
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#75672: 31.0.50; scratch/igc memory usage/collection issues
From: Pip Cet <[email-masked]>
To: [email-masked], [email-masked], [email-masked]
Date: Sun, 02 Mar 2025 18:38:46 +0000
List-Id: <debbugs-submit.debbugs.gnu.org>

"Pip Cet via \"Bug reports for GNU Emacs, the Swiss army knife of text editors\"" <[email-masked]> writes:

> "Alexis Purslane via \"Bug reports for GNU Emacs, the Swiss army knife of text editors\"" <[email-masked]> writes:
>
>> I've been using scratch/igc for the past few days (see details below for
>> the exact version and situation) and have been having some /interesting/
>> experiences:
>
> Alexis, can you open a new bug for new observations?  That would help us
> keep track of what's fixed and what isn't.

I'm closing this bug, but thanks for the report and please feel free to
report further observations!

Pip

Subject: 31.0.50; scratch/igc memory usage/collection issues
From: Alexis Purslane <[email-masked]>
To: [email-masked]
Date: Sun, 19 Jan 2025 16:59:46 +0000
List-Id: <debbugs-submit.debbugs.gnu.org>

I've been using scratch/igc for the past few days (see details below for
the exact version and situation) and have been having some /interesting/
experiences:

    1. It seems slower than Emacs 29.4 with GCMH (gcmh-idle-timer set to
    'auto, so it GCs usually after less than a second of idle time, and
    gcmh-max-cons-threshold set to 200MB so that if there's a very
    intense operation going on that's allocating a lot of memory, it
    will actually GC before it gets out of hand and the idle GC pause
    would freeze Emacs, but most of the time it'll almost never GC
    unless I'm idle) when opening a lot of files (for instance, when
    running org-agenda). About twice as slow. Startup is faster, though.

    2. It uses monotonically more and more memory throughout a session,
    even when doing things that shouldn't cause new memory to be
    allocated from the OS, eventually a really, really large amount
    (I've seen 2GB) even though the amount of memory it claims it's
    using when I run memory-report isn't that large. E.g., right now
    it's using 981 MB (just went up from 700 in the last few minutes
    despite only writing in this buffer the entire time), and
    memory-report says:

    Estimated Emacs Memory Usage

    73 MiB  Total Buffer Memory Usage
    18 MiB  Memory Used By Global Variables
   9.8 MiB  Memory Used By Symbol Plists
   1.1 MiB  Total Image Cache Size
       0 B  Reserved (But Unused) Object Memory
       0 B  Overall Object Memory Usage

Object Storage

       0 B  Strings
       0 B  Vectors
       0 B  Floats
       0 B  Conses
       0 B  Symbols
       0 B  Intervals
       0 B  Buffer-Objects

Largest Buffers

    67 MiB  *eshell*
     1 MiB  *sly-events for sbcl*
   966 KiB  init.el
   640 KiB  *sly-compilation*
   478 KiB   *nnimap 127.0.0.1 1143  *nntpd**
   364 KiB  *sent mail to [email-masked]*
   336 KiB  *sly-mrepl for sbcl*
   293 KiB  *unsent mail to [email-masked]*
   285 KiB  *Summary Sent*
   246 KiB  main.lisp
   183 KiB  tools.lisp
   161 KiB  video.lisp
   130 KiB   *sly-2*
   130 KiB   *sly-3*
    66 KiB  *Messages*
    66 KiB   *code-conversion-work*
    47 KiB  *Group*
    37 KiB   *which-key*
    36 KiB  *Async-native-compile-log*
    29 KiB  *sly-description*

Largest Variables

     2 MiB  load-history
   1.5 MiB  ucs-normalize-hangul-translation-alist
     1 MiB  nerd-icons/mdicon-alist
   746 KiB  easy-menu-converted-items-table
   659 KiB  face--new-frame-defaults
   613 KiB  sly-common-lisp-system-indentation
   565 KiB  undo-equiv-table
   498 KiB  gnus-newsrc-hashtb
   495 KiB  gnus-newsrc-alist
   494 KiB  nnimap-current-infos
   413 KiB  uni-confusable-table
   305 KiB  definition-prefixes
   285 KiB  nerd-icons/faicon-alist
   234 KiB  minor-mode-map-alist
   201 KiB  doom-themes-base-faces
   189 KiB  org-entities
   180 KiB  company-keywords-alist
   157 KiB  common-lisp-hyperspec--symbols
   149 KiB  global-map
   149 KiB  help-quick-use-map

    3. Eventually, Emacs will freeze irrecoverably (i.e., C-g doesn't
    work), probably trying to GC, causing total lossage of my Emacs
    session and necessitating a restart.

I may have configured it wrong, or it may be an issue particular to my
system, hence the debug info below.

In GNU Emacs 31.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version
 3.24.43, cairo version 1.18.2) of 2025-01-16 built on fedora
Repository revision: 6185a57afed3ef02b2608e6bc476d117b02c8e81
Repository branch: scratch/igc
System Description: Fedora Linux 41.20241229.0 (Silverblue)

Configured using:
 'configure
 CPPFLAGS=-I/home/alexispurslane/Development/scratch/emacs/mps/mps-artifacts
 LDFLAGS=-L/home/alexispurslane/Development/scratch/emacs/mps/mps-artifacts
 --with-cairo --with-dbus --with-gif --with-gpm=no --with-harfbuzz
 --with-jpeg --with-modules --with-native-compilation=aot --with-png
 --with-rsvg --with-sqlite3 --with-tiff --with-tree-sitter --with-webp
 --with-x-toolkit=gtk3 --with-xinput2 --with-xpm --with-mps=yes
 --with-pgtk --prefix=/var/home/alexispurslane/.local'

Configured features:
CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GSETTINGS HARFBUZZ JPEG
LIBSELINUX LIBXML2 MODULES MPS NATIVE_COMP NOTIFY INOTIFY PDUMPER PGTK
PNG SECCOMP SOUND THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER WEBP XIM
GTK3 ZLIB

Important settings:
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: @im=ibus
  locale-coding-system: utf-8-unix

Major mode: Group

Minor modes in effect:
  eshell-syntax-highlighting-global-mode: t
  global-fish-completion-mode: t
  fish-completion-mode: t
  eat-eshell-mode: t
  gnus-desktop-notify-mode: t
  gnus-undo-mode: t
  sly-symbol-completion-mode: t
  editorconfig-mode: t
  corfu-popupinfo-mode: t
  recentf-mode: t
  nerd-icons-completion-mode: t
  marginalia-mode: t
  icomplete-vertical-mode: t
  icomplete-mode: t
  which-key-mode: t
  spacious-padding-mode: t
  global-visual-fill-column-mode: t
  global-treesit-auto-mode: t
  electric-pair-mode: t
  repeat-mode: t
  delete-selection-mode: t
  motion-selection-mode: t
  god-local-mode: t
  windmove-mode: t
  winner-mode: t
  savehist-mode: t
  pixel-scroll-precision-mode: t
  minibuffer-depth-indicate-mode: t
  global-auto-revert-mode: t
  override-global-mode: t
  display-time-mode: t
  display-battery-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  show-paren-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tab-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  minibuffer-regexp-mode: t
  buffer-read-only: t
  column-number-mode: t
  line-number-mode: t
  global-visual-line-mode: t
  visual-line-mode: t
  transient-mark-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t

Load-path shadows:
/var/home/alexispurslane/.emacs.d/elpa/which-key-20240620.2145/which-key hides /var/home/alexispurslane/.local/share/emacs/31.0.50/lisp/which-key
/var/home/alexispurslane/.emacs.d/elpa/transient-20250108.1351/transient hides /var/home/alexispurslane/.local/share/emacs/31.0.50/lisp/transient
/var/home/alexispurslane/.emacs.d/elpa/editorconfig-20241027.1815/editorconfig-tools hides /var/home/alexispurslane/.local/share/emacs/31.0.50/lisp/editorconfig-tools
/var/home/alexispurslane/.emacs.d/elpa/editorconfig-20241027.1815/editorconfig-fnmatch hides /var/home/alexispurslane/.local/share/emacs/31.0.50/lisp/editorconfig-fnmatch
/var/home/alexispurslane/.emacs.d/elpa/editorconfig-20241027.1815/editorconfig hides /var/home/alexispurslane/.local/share/emacs/31.0.50/lisp/editorconfig
/var/home/alexispurslane/.emacs.d/elpa/editorconfig-20241027.1815/editorconfig-core-handle hides /var/home/alexispurslane/.local/share/emacs/31.0.50/lisp/editorconfig-core-handle
/var/home/alexispurslane/.emacs.d/elpa/editorconfig-20241027.1815/editorconfig-core hides /var/home/alexispurslane/.local/share/emacs/31.0.50/lisp/editorconfig-core
/var/home/alexispurslane/.emacs.d/elpa/editorconfig-20241027.1815/editorconfig-conf-mode hides /var/home/alexispurslane/.local/share/emacs/31.0.50/lisp/editorconfig-conf-mode

Features:
(gnus-draft gnus-async shrface embark-org ox-odt rng-loc rng-uri
rng-parse rng-match rng-dt rng-util rng-pttrn nxml-parse nxml-ns
nxml-enc xmltok nxml-util ox-latex ox-icalendar org-agenda ox-html table
ox-ascii ox-publish ox org-attach org-element org-persist org-id
org-refile org-element-ast inline avl-tree orgtbl-ascii-plot org ob
ob-tangle ob-ref ob-lob ob-table ob-exp org-macro org-src sh-script smie
executable ob-comint org-pcomplete org-list org-footnote org-faces
org-entities org-version ob-emacs-lisp ob-core ob-eval org-cycle
org-table ol org-fold org-fold-core org-keys oc org-loaddefs cal-menu
calendar cal-loaddefs org-compat org-macs qp gnus-ml nnfolder nndraft
nnmh nnselect utf-7 epa-file gnus-agent gnus-srvr gnus-score score-mode
nnvirtual gnus-msg gnus-cache textsec uni-scripts idna-mapping
ucs-normalize uni-confusable textsec-check ispell checkdoc lisp-mnt
elisp-def ert debug backtrace find-func f s highlight-defined advice
shadow sort smtpmail-async ecomplete mail-extr emacsbug char-fold
pcmpl-x pcmpl-unix company-oddmuse company-keywords company-etags
company-gtags company-dabbrev-code company-dabbrev company-files
company-clang company-capf company-cmake company-semantic
company-template company-bbdb esh-autosuggest company em-term em-script
em-pred em-hist em-glob em-extpipe em-basic em-banner
eshell-syntax-highlighting em-prompt em-alias esh-help man em-unix
fish-completion em-cmpl eshell-prompt-extras em-dirs em-ls eshell
esh-mode esh-var eat term ehelp esh-cmd esh-ext esh-proc esh-opt esh-io
esh-arg esh-module esh-module-loaddefs esh-util gnus-demon nntp
gnus-desktop-notify smtpmail gnus-registry registry eieio-base gnus-art
mm-uu mml2015 mm-view mml-smime smime gnutls dig gnus-sum gnus-group
gnus-undo gnus-start gnus-dbus gnus-cloud nnimap nnmail mail-source nnoo
gnus-spec gnus-win gnus-int gnus-range imap rfc2104 utf7 gnus nnheader
range embark-consult embark ffap apheleia apheleia-rcs apheleia-dp
apheleia-formatters apheleia-utils apheleia-log
apheleia-formatter-context whitespace misearch multi-isearch puni
sly-asdf grep sly-fancy sly-tramp tramp trampver tramp-integration
tramp-message tramp-compat xdg shell pcomplete parse-time iso8601
tramp-loaddefs sly-indentation sly-cl-indent sly-stickers pulse hi-lock
sly-trace-dialog sly-fontifying-fu sly-package-fu sly-scratch
sly-fancy-trace sly-fancy-inspector sly-mrepl sly-autodoc sly-parse
network-stream nsm help-fns radix-tree mule-util vc-git files-x
sly-macrostep macrostep sly-overlay sly sly-completion sly-buttons
sly-messages sly-common apropos etags fileloop generator xref arc-mode
archive-mode hyperspec lisp-extra-font-lock highlight-numbers
parent-mode noutline outline flymake project compile comint ansi-osc
ansi-color display-line-numbers diff-hl log-view log-edit message
sendmail yank-media dired-subtree dired-hacks-utils dired-aux dired
dired-loaddefs rfc822 mml mml-sec epa derived epg rfc6068 epg-config
gnus-util mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047
rfc2045 mm-util ietf-drums mail-prsvr mailabbrev mail-utils gmm-utils
mailheader add-log pcvs-util vc-dir vc vc-dispatcher diff-mode
track-changes editorconfig editorconfig-core editorconfig-core-handle
editorconfig-fnmatch yasnippet-capf thingatpt common-lisp-snippets
yasnippet eldoc-box hl-todo ligature corfu-popupinfo nerd-icons-corfu
corfu comp comp-cstr comp-run comp-common consult recentf tree-widget
orderless nerd-icons-completion marginalia icomplete which-key ement
ement-notifications ement-notify notifications ement-room transient
bookmark face-remap shr text-property-search pixel-fill kinsoku url-file
puny svg dom ewoc ement-lib ement-api ement-structs ement-macros
magit-section cursor-sensor dash compat plz warnings color dns
nerd-icons nerd-icons-faces nerd-icons-data nerd-icons-data-mdicon
nerd-icons-data-flicon nerd-icons-data-codicon nerd-icons-data-devicon
nerd-icons-data-sucicon nerd-icons-data-wicon nerd-icons-data-faicon
nerd-icons-data-powerline nerd-icons-data-octicon
nerd-icons-data-pomicon nerd-icons-data-ipsicon spacious-padding
almost-mono-black-theme doom-themes doom-themes-base visual-fill-column
treesit-auto treesit hl-line elec-pair repeat delsel
motion-selection-mode god-mode-isearch god-mode time-date async
disp-table windmove winner savehist pixel-scroll cua-base ring mb-depth
help-at-pt autorevert filenotify cus-edit pp cus-load wid-edit pcase
finder-inf almost-mono-themes edmacro kmacro use-package-bind-key
bind-key easy-mmode time format-spec battery dbus xml gcmh cl-extra
help-mode use-package-ensure use-package-core package browse-url url
url-proxy url-privacy url-expand url-methods url-history url-cookie
generate-lisp-file url-domsuf url-util mailcap url-handlers url-parse
auth-source cl-seq eieio eieio-core cl-macs icons password-cache json
subr-x map byte-opt gv bytecomp byte-compile url-vars rx profiler
cl-loaddefs cl-lib info CLEDE-autoloads almost-mono-themes-autoloads
apheleia-autoloads async-autoloads auto-highlight-symbol-autoloads
breadcrumb-autoloads calibredb-autoloads centered-window-autoloads
clojure-ts-mode-autoloads common-lisp-snippets-autoloads
consult-gnome-search-autoloads consult-notes-autoloads corfu-autoloads
dape-autoloads darkroom-autoloads devdocs-autoloads diff-hl-autoloads
dired-sidebar-autoloads dired-subtree-autoloads
dired-hacks-utils-autoloads docker-autoloads aio-autoloads
doom-themes-autoloads eat-autoloads editorconfig-autoloads
eldoc-box-autoloads elisp-def-autoloads elisp-demos-autoloads
embark-consult-autoloads consult-autoloads embark-autoloads
ement-autoloads enlight-autoloads esh-autosuggest-autoloads
company-autoloads esh-help-autoloads eshell-prompt-extras-autoloads
eshell-syntax-highlighting-autoloads evil-cleverparens-autoloads
evil-collection-autoloads annalist-autoloads evil-god-state-autoloads
evil-org-autoloads evil-textobj-tree-sitter-autoloads expreg-autoloads
exwm-autoloads fish-completion-autoloads flymake-proselint-autoloads
flymake-vale-autoloads forge-autoloads closql-autoloads
emacsql-autoloads gcmh-autoloads ghub-autoloads glsl-mode-autoloads
gnuplot-autoloads gnuplot-mode-autoloads gnus-desktop-notify-autoloads
god-mode-autoloads helpful-autoloads elisp-refs-autoloads f-autoloads
highlight-blocks-autoloads highlight-defined-autoloads
highlight-function-calls-autoloads highlight-numbers-autoloads
highlight-parentheses-autoloads highlight-stages-autoloads
highlight-thing-autoloads highlight-unique-symbol-autoloads
deferred-autoloads hl-todo-autoloads htmlize-autoloads
hungry-delete-autoloads keycast-autoloads latex-preview-pane-autoloads
ligature-autoloads lisp-extra-font-lock-autoloads magit-autoloads
marginalia-autoloads markdown-mode-autoloads mathjax-autoloads
mood-line-autoloads motion-selection-mode-autoloads
nerd-icons-completion-autoloads nerd-icons-corfu-autoloads
nerd-icons-dired-autoloads nerd-icons-autoloads nov-autoloads
esxml-autoloads kv-autoloads orderless-autoloads org-mime-autoloads
orgtbl-ascii-plot-autoloads ox-rss-autoloads
package-lint-flymake-autoloads package-lint-autoloads
pandoc-mode-autoloads paredit-autoloads parent-mode-autoloads
persist-autoloads plz-autoloads poet-theme-autoloads pos-tip-autoloads
puni-autoloads rainbow-identifiers-autoloads request-autoloads
shrface-autoloads language-detection-autoloads sly-asdf-autoloads
popup-autoloads sly-macrostep-autoloads macrostep-autoloads
sly-overlay-autoloads sly-autoloads smartparens-autoloads
spacious-padding-autoloads svg-lib-autoloads symbol-overlay-autoloads
syncthing-autoloads tablist-autoloads taxy-magit-section-autoloads
taxy-autoloads magit-section-autoloads theme-anchor-autoloads
toc-org-autoloads transient-autoloads treemacs-evil-autoloads
treemacs-autoloads cfrs-autoloads posframe-autoloads ht-autoloads
hydra-autoloads lv-autoloads pfuture-autoloads ace-window-autoloads
avy-autoloads s-autoloads dash-autoloads evil-autoloads
goto-chg-autoloads treepy-autoloads treesit-auto-autoloads
vimgolf-autoloads visual-fill-column-autoloads wgrep-autoloads
which-key-autoloads whole-line-or-region-autoloads with-editor-autoloads
xelb-autoloads yaml-autoloads yasnippet-capf-autoloads
yasnippet-autoloads rmc iso-transl tooltip cconv eldoc paren electric
uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel
term/pgtk-win pgtk-win term/common-win touch-screen pgtk-dnd tool-bar
dnd fontset image regexp-opt fringe tabulated-list replace newcomment
text-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow
isearch easymenu timer select scroll-bar mouse jit-lock font-lock syntax
font-core term/tty-colors frame minibuffer nadvice seq simple cl-generic
indonesian philippine cham georgian utf-8-lang misc-lang vietnamese
tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek
romanian slovak czech european ethiopic indian cyrillic chinese
composite emoji-zwj charscript charprop case-table epa-hook
jka-cmpr-hook help abbrev obarray oclosure cl-preloaded button loaddefs
theme-loaddefs faces cus-face macroexp files window text-properties
overlay sha1 md5 base64 format env code-pages mule custom widget keymap
hashtable-print-readable backquote threads dbusbind inotify
dynamic-setting system-font-setting font-render-setting cairo gtk pgtk
multi-tty move-toolbar make-network-process native-compile mps emacs)

Memory information:
((conses 24 0 0) (symbols 56 0 0) (strings 40 0 0)
 (string-bytes 1 0) (vectors 24 0) (vector-slots 8 0 0)
 (floats 24 0 0) (intervals 64 0 0) (buffers 1000 0))