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, 29 Jan 2020 08:17:11 +0100 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="35877"; mail-complaints-to="usenet@ciao.gmane.io" To: guile-devel@gnu.org Original-X-From: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Wed Jan 29 08:17:46 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 1iwhbe-0009Ij-GG for guile-devel@m.gmane-mx.org; Wed, 29 Jan 2020 08:17:46 +0100 Original-Received: from localhost ([::1]:42124 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iwhbd-0007KV-CJ for guile-devel@m.gmane-mx.org; Wed, 29 Jan 2020 02:17:45 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:55990) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iwhbJ-0007KO-DW for guile-devel@gnu.org; Wed, 29 Jan 2020 02:17:26 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iwhbI-0001Yx-3o for guile-devel@gnu.org; Wed, 29 Jan 2020 02:17:25 -0500 Original-Received: from mail-ot1-x32e.google.com ([2607:f8b0:4864:20::32e]:39772) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iwhbH-0001YY-TA for guile-devel@gnu.org; Wed, 29 Jan 2020 02:17:24 -0500 Original-Received: by mail-ot1-x32e.google.com with SMTP id 77so14614162oty.6 for ; Tue, 28 Jan 2020 23:17:23 -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; bh=olOpLL0bJNxvgqXJcBQydzhH3Q3HG/A9jfF3K85/cwA=; b=C2apFw0baQJcT2y59rEqz2uC/viOXAMVnOyx4dGiYOhuVabECJbGUArspTUTOSO4zw 96fR1+Q4bIC5NNF169vCBn5zZXKf0n3hlXbRn0DVAEAMrbzNwDvK2HvPbCXTNeRIeinr djOA4eVfKZfSXVKacEt7zRAOdvbjpRKi+Xd2erXrMDmmSRx9lBXBsdWb9YlIYnsqwakF 5BiAwJoodvsDX/1Z66ki0vIj5o+85ZghwfygsSNvopacINtHR3m6BzQu/e956K7VjL/q /hUoXQmet9HvKIs2d/jGNarltJi/evTKPpXbRfbDiobYo4g8026cujzX0qyTZBALCIaT eO7A== 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; bh=olOpLL0bJNxvgqXJcBQydzhH3Q3HG/A9jfF3K85/cwA=; b=d9ezcA8/IXZiyv+x9GpgxtSVAZmNpHRcrcl7LLIMjaJgW8MepL5YVwNSdF6EWDMVmk lCvER0ZssqrihLmtir/c0tKqZsVd9Uo+y2O7TZgH+NcSg/x36CVo1v/r8VMegh/09V/t mhP3kQtiTt6IR/GMh1G837gMMD3LEvm0Gnp3vmM176aW/5Iqg/mOegbF/TUnvXgv61xy B8kJ8Umr6TULahQoft6myEHNlJBZhMOeDTb4XTgIXZivGYwNN2NL1PKOHshw0Q5JDh+h 7eZfV1L1LpLbXacYTI2cq70/5Iy2Icy7rZj2MJ9hH1VKRPIwuQp3TYBCUFDwuSmAEZrs SS8w== X-Gm-Message-State: APjAAAVJbH7CZ9t+6G2iFafbEgJg0HYhxMB4mI5eHsfEuVjvrPQmcs3K D7NP4g3wwoS+r0ptMp3B7QdUBByPq1rXEBRp9ICZ1tODMx4= X-Google-Smtp-Source: APXvYqwgAUCrq9hXuiGkGAow8J2ZIqJGosDt9RwAMPPcbHW2R3dYnNiiS1uow/XUxFjEWkacsE7z+2r2p3rXrPNBhkY= X-Received: by 2002:a05:6830:2111:: with SMTP id i17mr18468400otc.24.1580282242588; Tue, 28 Jan 2020 23:17:22 -0800 (PST) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::32e 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:20351 Archived-At: (please CC replies directly to me; I am not on the guile-devel list.) Arne mentioned >This might be the read-function which is slower in 2.2. You might want >to try to go directly to Guile 3, in which the read function should be >on par with the read in 1.8. I'd rather avoid making a jump to GUILE 3, as it's not in distributionsn yet. Just to be extra clear: if I instrument Lily with (begin (display "gc time taken: ") (display (* 1.0 (/ (cdr (assoc 'gc-time-taken (gc-stats))) internal-time-units-per-second))) (display "\n"))) this number increases from 0.3 to 1.7. Parsing and compiling the .scm files in our distribution has a GC overhead of 0.3 by itself on GUILE 2.2 The release notes for 2.0 say that "Switch to the Boehm-Demers-Weiser garbage collector .. It also improves performance." I am curious about the numbers that support this; can somebody point me to them? From where I stand, it looks like a huge performance regression. On Tue, Jan 28, 2020 at 11:41 PM Han-Wen Nienhuys wrote: > > Hi folks, > > after a long hiatus I have started getting involved with LilyPond > again, and one of the things I'd like to do is get LilyPond off GUILE > 1.8. Experiments suggest that starting from GUILE 2.2, the execution > performance is on par with 1.8. There are 2 open issues: caching byte > compiled files (which I haven't looked into yet), and GC. > > Unfortunately, it looks like the adoption of the BDW GC library caused > a ~6x slowdown, causing an overall end-to-end slowdown of 50%. > > I was wondering if you folks would have tips to further tune GC for > wall-time speed, and if there additional diagnostics to see if we're > doing something extraordinarily silly. > > I already found the GC_free_space_divisor, but I already tuned to its > fastest value, 1. > > -- > Han-Wen Nienhuys - hanwenn@gmail.com - http://www.xs4all.nl/~hanwen -- Han-Wen Nienhuys - hanwenn@gmail.com - http://www.xs4all.nl/~hanwen