all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Dmitrii Korobeinikov <dim1212k@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: emacs-devel <emacs-devel@gnu.org>
Subject: Re: Garbage collector: is 800kb a good default?
Date: Thu, 9 Apr 2020 19:44:40 +0600	[thread overview]
Message-ID: <CA+Yh0SQJPVKQsmf9=kdVqEW48vXAAerXrrJbGOT2Gt=BsD3YZg@mail.gmail.com> (raw)
In-Reply-To: <83o8s0on41.fsf@gnu.org>

> Two things: (1) the timer will not run as long as Emacs is running
> some prolonged calculation, which could produce a lot of garbage; and

True, that's a reason for not making it too high. Emacs would also
freeze very noticably in those cases. But I think the threshold
doesn't have to be very high to reap most of the the benefits. For
example, I am testing 80MB at the moment. Pretty sure I would be
satisfied with half that. By satisfied I mean 3.5k lines of scroll
action would still be plenty (before a ~1/3-1/2 second gc freeze
happens) and the startup time would be shaved off quite close to the
apparent limit anyway.

> (2) you seem to ignore the increased memory pressure on the rest of
> the system from the growing memory footprint of Emacs.  On GNU/Linux,
> Emacs doesn't really return malloc'ed memory to the system, so once
> the memory footprint grows, it more or less stays that way even after
> GC.

Didn't know about that. A ground of reasoning here could be what the
average user would see as acceptable. Of course, there are also people
who optimize their system for memory consumption. But they are
probably tech-savvy enough to find the gc options anyway.

чт, 9 апр. 2020 г. в 18:33, Eli Zaretskii <eliz@gnu.org>:
>
> > From: Dmitrii Korobeinikov <dim1212k@gmail.com>
> > Date: Thu, 9 Apr 2020 17:59:04 +0600
> >
> > So, as far as I can see, defaulting to a higher threshold with an idle
> > timer could yield better user experience with practically no
> > significant tradeoffs. Is there something I might be missing here?
>
> Two things: (1) the timer will not run as long as Emacs is running
> some prolonged calculation, which could produce a lot of garbage; and
> (2) you seem to ignore the increased memory pressure on the rest of
> the system from the growing memory footprint of Emacs.  On GNU/Linux,
> Emacs doesn't really return malloc'ed memory to the system, so once
> the memory footprint grows, it more or less stays that way even after
> GC.
>
> Now, I'm not saying that we cannot or shouldn't increase the default
> GC threshold, but we must keep these two aspects in mind while
> discussing this.



  reply	other threads:[~2020-04-09 13:44 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-09 11:59 Garbage collector: is 800kb a good default? Dmitrii Korobeinikov
2020-04-09 12:33 ` Eli Zaretskii
2020-04-09 13:44   ` Dmitrii Korobeinikov [this message]
2020-04-09 14:02     ` Eli Zaretskii
2020-04-09 14:46       ` Dmitrii Korobeinikov
2020-04-09 16:42         ` Eli Zaretskii
2020-04-10 16:40           ` Dmitrii Korobeinikov
2020-04-09 19:05         ` Stefan Monnier
2020-04-10 16:26           ` Dmitrii Korobeinikov
2020-04-09 18:48     ` Stefan Monnier
2020-04-10 14:26   ` Bruno Félix Rezende Ribeiro
2020-04-10 16:49     ` Eli Zaretskii
2020-04-10 18:26       ` Bruno Félix Rezende Ribeiro
2020-04-10 18:53         ` Paul Eggert
2020-04-09 13:47 ` Stefan Monnier
2020-04-09 14:20   ` Dmitrii Korobeinikov
2020-04-09 14:23   ` Eli Zaretskii
2020-04-09 18:42     ` Stefan Monnier
2020-04-09 19:08       ` Eli Zaretskii
2020-04-09 19:31         ` Stefan Monnier
2020-04-10  6:19           ` Eli Zaretskii
2020-04-10 13:03             ` Stefan Monnier
2020-04-10 13:42               ` Eli Zaretskii
2020-04-10 14:34                 ` Stefan Monnier
2020-04-10 14:38                   ` Stefan Monnier
2020-04-10 15:37                   ` Eli Zaretskii
2020-04-10 15:52                   ` Andrea Corallo
2020-04-10 16:45                     ` Stefan Monnier
2020-04-10 17:18                       ` Andrea Corallo
2020-04-09 14:48   ` Andrea Corallo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CA+Yh0SQJPVKQsmf9=kdVqEW48vXAAerXrrJbGOT2Gt=BsD3YZg@mail.gmail.com' \
    --to=dim1212k@gmail.com \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.