unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: Mikael Djurfeldt <mikael@djurfeldt.com>
To: Han-Wen Nienhuys <hanwenn@gmail.com>
Cc: "Ludovic Courtès" <ludo@gnu.org>, "Guile Devel" <guile-devel@gnu.org>
Subject: Re: garbage collection slowdown
Date: Thu, 6 Feb 2020 15:06:14 +0100	[thread overview]
Message-ID: <CAA2XvwLTSchXN2UfGoe9BgqKXsOFvzyJpeqNndzC3VRiHnyABg@mail.gmail.com> (raw)
In-Reply-To: <CAOw_e7Y3aoJwEckMY6Z1BuqFoYuod8b-PYrDouNVV9cG722RfA@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1674 bytes --]

Den ons 5 feb. 2020 23:32Han-Wen Nienhuys <hanwenn@gmail.com> skrev:

>
>
> On Wed, Feb 5, 2020 at 5:23 PM Ludovic Courtès <ludo@gnu.org> wrote:
>
>> Weird.  It would be interesting to see where the slowdown comes from.
>> Overall, my recollection of the 1.8 to 2.0 transition (where we
>> introduced libgc) is that GC was a bit faster, definitely not slower.
>>
>> That said, does LilyPond happen to use lots of bignums and/or lots of
>> finalizers?  Finalizers, including those on bignums, end up being very
>> GC-intensive, as discussed in my recent message.  Perhaps that’s what’s
>> happening here, for instance if you create lots of SMOBs with a free
>> function.
>>
>
> No, I think it's because in some phases of the program, there is a lot of
> heap growth, with little garbage generation. This causes frequent
> (expensive) GCs that don't reclaim anything.
>

When programming dynamic vectors, it is common to adapt the size of newly
allocated chunks by letting them grow in proportion to vector size.

Could the frequency of GC be adapted similarly such that the balance
between GC and allocation is shifted towards allocation in phases with a
lot of heap growth?

More concretely, this could either be achieved by letting the newly
allocated chunks grow in proportion to allocated memory (as I think it was
in the 1.8 GC---don't know about now) or by choosing to not do a GC every
time, but instead directly allocate if running average of GC gain is small
compared to allocated memory.

Of course these are issues at research level...


>
> --
> Han-Wen Nienhuys - hanwenn@gmail.com - http://www.xs4all.nl/~hanwen
>

[-- Attachment #2: Type: text/html, Size: 3110 bytes --]

  reply	other threads:[~2020-02-06 14:06 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-28 22:41 garbage collection slowdown Han-Wen Nienhuys
2020-01-29  0:47 ` Arne Babenhauserheide
2020-01-29  7:17 ` Han-Wen Nienhuys
2020-02-01  9:34 ` Han-Wen Nienhuys
2020-02-05 16:22   ` Ludovic Courtès
2020-02-05 22:31     ` Han-Wen Nienhuys
2020-02-06 14:06       ` Mikael Djurfeldt [this message]
2020-02-06 17:19         ` Ludovic Courtès

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

  List information: https://www.gnu.org/software/guile/

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

  git send-email \
    --in-reply-to=CAA2XvwLTSchXN2UfGoe9BgqKXsOFvzyJpeqNndzC3VRiHnyABg@mail.gmail.com \
    --to=mikael@djurfeldt.com \
    --cc=guile-devel@gnu.org \
    --cc=hanwenn@gmail.com \
    --cc=ludo@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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).