From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Ihor Radchenko Newsgroups: gmane.emacs.devel Subject: Re: Larger GC thresholds for non-interactive Emacs Date: Sun, 19 Jun 2022 15:25:15 +0800 Message-ID: <87k09dxgh0.fsf@localhost> References: <83bkuzznws.fsf@gnu.org> <877d5mqmkh.fsf@localhost> <83y1y2utnd.fsf@gnu.org> <87r13up587.fsf@localhost> <83o7yyur0l.fsf@gnu.org> <87leu2p3nu.fsf@localhost> <83leu2uewn.fsf@gnu.org> <87r13qv701.fsf@localhost> <83bkuursya.fsf@gnu.org> <87h74l9jk8.fsf@localhost> <83bkutqb3z.fsf@gnu.org> <9778F176-E724-4E61-B0FB-327BCDD316C0@acm.org> <87sfo4epeo.fsf@localhost> <87bkurrc5e.fsf@localhost> <87bkur72b7.fsf@gnus.org> <874k0j40e7.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="38440"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Lars Ingebrigtsen , Mattias =?utf-8?Q?Engdeg=C3=A5rd?= , Eli Zaretskii , Tim Cross , rms@gnu.org, Alan Mackenzie , emacs-devel To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Jun 19 09:24:47 2022 Return-path: Envelope-to: ged-emacs-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 1o2pIc-0009nu-KM for ged-emacs-devel@m.gmane-mx.org; Sun, 19 Jun 2022 09:24:46 +0200 Original-Received: from localhost ([::1]:56524 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o2pIb-0003vb-9y for ged-emacs-devel@m.gmane-mx.org; Sun, 19 Jun 2022 03:24:45 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:35688) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o2pI2-0003Fu-N6 for emacs-devel@gnu.org; Sun, 19 Jun 2022 03:24:10 -0400 Original-Received: from mail-pj1-x102f.google.com ([2607:f8b0:4864:20::102f]:54865) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o2pI1-0003Gn-4R; Sun, 19 Jun 2022 03:24:10 -0400 Original-Received: by mail-pj1-x102f.google.com with SMTP id cv13so4915981pjb.4; Sun, 19 Jun 2022 00:24:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version; bh=3t5tZVFR6NcEQTzo33ASv6D2OasSjfdNmXQ+UoKvZyc=; b=O7jVZiI2DWwdlzN4xH6nBuVHrTrPiNqOIvbqm4+leJY+/Ud1JKYzIEH0OZpTxDSBbf gFKbZ/kVhNunRDrN53Qp6vpS/i7+Q3/hWCZNeXSvBTaqPi/K38/VZEjnGGrImutiHLjI i+WtmLyF8yNdYseTqjfftz3V6FXHVckd+7dVMLQQKun6i5G13nI3OILBVhyBUn8/WChY ALs5YvTcFaxPrm473JBjeUSm1K3hdL+X5L46+dlH7i0ehfd5SOc32btTdEYi9V8/m1B0 RCCf/iH2lxWHIi6Q2wbP7UH5CFQAJPR7lT/jQ9y9aDn/I2wDgUWSg/zP4ZyCcsrKdqzc cyqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version; bh=3t5tZVFR6NcEQTzo33ASv6D2OasSjfdNmXQ+UoKvZyc=; b=GakXx/dR8QekkOTVB3iYlnsPcW1jlQ5bI4EArC3IuXYm8BQ5RoujiwCOe4BGOrcbNE tEm0w06/6e+xdRVt1HehhZNXARsBXgSx8FsG/Q6yO+1JxQxKWBNrWsfuz4Z+bXYwnyal mno1lsN8087AP7yLVE8BZ/Ruzukh5cskS12eyCqtezzcmxP6zGAW7PoqinNb2Pf9kKIR h38RdBq1LBvVJ3bnxeN8pRWf2l1pImAyTaXTwRpWPVo1pF/yUUK1nzvfAUMc+YylXl9W or+8ZFoGWGXcB6Vj15YrA8a4OOEF8AfaCgqspqPWfM7Qct1sjHfFFEzr3QHuXuY0H2d+ PTew== X-Gm-Message-State: AJIora9JfuZLuds8fj4XT8WuAOuSteqDXk04ayHqF/EsVt7CAlgIOwjK SHMK0n3sgGAUU+hCJ59zmUI= X-Google-Smtp-Source: AGRyM1tMyrOzX/NjS4tEhoICmgfgigD1rfMIrIMNlfDJtqpAPPA3akn+3N7JeDWHUUh3ks/pLJopag== X-Received: by 2002:a17:90b:3e8b:b0:1e8:66c2:c61c with SMTP id rj11-20020a17090b3e8b00b001e866c2c61cmr30677332pjb.181.1655623446456; Sun, 19 Jun 2022 00:24:06 -0700 (PDT) Original-Received: from localhost ([64.32.23.62]) by smtp.gmail.com with ESMTPSA id c18-20020a170902b69200b00168eb15f4c1sm6308318pls.210.2022.06.19.00.24.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 19 Jun 2022 00:24:05 -0700 (PDT) In-Reply-To: Received-SPF: pass client-ip=2607:f8b0:4864:20::102f; envelope-from=yantar92@gmail.com; helo=mail-pj1-x102f.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:291408 Archived-At: Stefan Monnier writes: > I also took a look at related data. E.g. comparing p=1.0 to the old > p-0.1 on the process that performs the highest number of GCs (188 cycles > with p=1.0 and 650 cycles with p=0.1) during an Emacs build. Here are > the corresponding last few GC cycles: > > % grep GC-26227 ./+make-0.1.log | tail -n 10 > GC-26227 p=0.1 total=18.8M free=1.9M thresold=1.9M > ... > GC-26227 p=0.1 total=145.7M free=32.6M thresold=14.6M > GC-26227 p=0.1 total=132.8M free=60.7M thresold=13.3M > % grep GC-898 ./+make-1.0.log | tail -n 10 > GC-898 p=1.0 total=18.5M free=7.5M thresold=18.5M > ... > GC-898 p=1.0 total=145.7M free=32.6M thresold=145.7M > % I feel that I am confused about this data. We have gc-cons-threshold and gc-cons-percentage According to the gc-cons-percentage docstring: >> If this portion is smaller than `gc-cons-threshold', this is ignored. which implies that gc-cons-percentage only takes effect when heap_size * gc-cons-percentage >= gc-cons-threshold (= 0.8M) So, heap_size should be >= 80M to take effect at p=1.0 and heap_size should be >= 800M to take effect at p=0.1 yet, you do see an effect at total=18.5M. What am I missing? Best, Ihor