From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Han-Wen Nienhuys Newsgroups: gmane.lisp.guile.devel Subject: Re: garbage collection slowdown Date: Wed, 5 Feb 2020 23:31:09 +0100 Message-ID: References: <877e11m2ao.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="00000000000031186a059ddbb79f" Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="9339"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Guile Devel To: =?UTF-8?Q?Ludovic_Court=C3=A8s?= Original-X-From: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Wed Feb 05 23:31:55 2020 Return-path: Envelope-to: guile-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1izTD9-0002K5-3U for guile-devel@m.gmane-mx.org; Wed, 05 Feb 2020 23:31:55 +0100 Original-Received: from localhost ([::1]:57772 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1izTD8-0001d0-6c for guile-devel@m.gmane-mx.org; Wed, 05 Feb 2020 17:31:54 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51383) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1izTCf-0001cL-SQ for guile-devel@gnu.org; Wed, 05 Feb 2020 17:31:27 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1izTCe-0008Un-OU for guile-devel@gnu.org; Wed, 05 Feb 2020 17:31:25 -0500 Original-Received: from mail-oi1-x231.google.com ([2607:f8b0:4864:20::231]:43332) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1izTCb-0008DG-SS; Wed, 05 Feb 2020 17:31:23 -0500 Original-Received: by mail-oi1-x231.google.com with SMTP id p125so2496131oif.10; Wed, 05 Feb 2020 14:31:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=gNss2Oyv5sYJ8Rt4NsyTzT+sW8XkICQna268in+zl7s=; b=lKUmQickmYxle1RKvfcNSLNa2mqkPVCDC7uaGv+X6BqAvtvIpjatuThkGRcrInab5l gNSjE+ACz1O8p0MuGetjKYaeucr/m2Yt7dfJ5981KM4DOf50Ad5NjJepF9Kjo5gaI/Pf JHZUaKvHr4r6jiYN+Or3kbBjTd1x5ifMKMqxwU2aXKlvn3GHf5hPkGRW8Yk2fFiOM4Sm 8Yhf6vaZakob4V3ytXARTwuHhl9dVOn2gVHN05507veNoMfztvraxlOCHfDqgHmAKPaJ Mdrg02cyaUtBGNKyMLMwN43y2JWWzyxlY8Wxeig9YmN2p6/RoZSQ6gbHoiWwhAdkp2ls lx1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=gNss2Oyv5sYJ8Rt4NsyTzT+sW8XkICQna268in+zl7s=; b=BU98PmTU0aW+SffdiIGSow4sORPoGb+O3eap2e86fQlkLCyro6rTv0yzVr6pDBA9IL CxsI8XNmAtntdFwmqeIvfpJb8eRYzy1jJWd75DcyP/7QPNw3jyNdrYetCX7Pm5/ezHkh a8s57y3b7Y2S9Ypx48I3RJgeUjLa+9xYuJ/vITbhdV0z+OwjvI6ZgVtR4nwEI3vnJOk+ BRReyb/ELALJjzG5XMQCbaozLv8JJXrt7iW0FQ1j68qWmxhan7f/UdJIA8YNQGGMX/EW hDrfrIhEnKHJzcI+kMwwtSo1iwNiCgL/iSxbsSbi/JL4+cdMbXvyBrHPAgrQBZ4qHAbl f1Vw== X-Gm-Message-State: APjAAAV969Gig2GpJGG9Cz+mpLxmxoTmamywa6mY88IRzxIHJm4ZXXiI cy/CQ8+B/ODJ0B3jTiKgVYvTSP558lOGmok8b2KOx/uu X-Google-Smtp-Source: APXvYqyiEv+jOtfFjuFruTCi2S6P4zNRcxQ5bqJkX70BsbIoTqDTED7nU9NX0Hlwe8+hEzUDwp4kGXq3/GDP2CAXUp0= X-Received: by 2002:aca:5258:: with SMTP id g85mr4892816oib.80.1580941880398; Wed, 05 Feb 2020 14:31:20 -0800 (PST) In-Reply-To: <877e11m2ao.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::231 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Original-Sender: "guile-devel" Xref: news.gmane.io gmane.lisp.guile.devel:20392 Archived-At: --00000000000031186a059ddbb79f Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, Feb 5, 2020 at 5:23 PM Ludovic Court=C3=A8s 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=E2=80=99s = what=E2=80=99s > 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. --=20 Han-Wen Nienhuys - hanwenn@gmail.com - http://www.xs4all.nl/~hanwen --00000000000031186a059ddbb79f Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Wed, Feb 5, 2020 at 5:23 PM Ludovi= c Court=C3=A8s <ludo@gnu.org> wro= te:
Weird.=C2=A0= 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?=C2=A0 Finalizers, including those on bignums, end up being very=
GC-intensive, as discussed in my recent message.=C2=A0 Perhaps that=E2=80= =99s what=E2=80=99s
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 g= arbage generation. This causes frequent (expensive) GCs that don't recl= aim anything.


--
=
--00000000000031186a059ddbb79f--