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: Mon, 20 Jun 2022 20:21:24 +0800 Message-ID: <87wndb34qj.fsf@localhost> References: <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> <874k0hxb0g.fsf@localhost> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="2170"; 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 Mon Jun 20 14:23:22 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 1o3GR8-0000Nq-Gw for ged-emacs-devel@m.gmane-mx.org; Mon, 20 Jun 2022 14:23:22 +0200 Original-Received: from localhost ([::1]:50190 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o3GR7-0005IO-Kk for ged-emacs-devel@m.gmane-mx.org; Mon, 20 Jun 2022 08:23:21 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:55512) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o3GOB-0002jf-K9 for emacs-devel@gnu.org; Mon, 20 Jun 2022 08:20:19 -0400 Original-Received: from mail-qk1-x736.google.com ([2607:f8b0:4864:20::736]:45822) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o3GO9-0007RM-Ij; Mon, 20 Jun 2022 08:20:19 -0400 Original-Received: by mail-qk1-x736.google.com with SMTP id x75so7621707qkb.12; Mon, 20 Jun 2022 05:20:15 -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=RDh3qIP0EkPmHWbC7nlJMtgw3a1wPx1g0mzVJyhYnj4=; b=ZulIjB9NgNQ0QSz4wKKJVNZLA0YbVIKah134b1Nesyj1gml0WPlM5jp4EuDatKQSEo zonjbvbbEumFvslKQYo1TtN99jytROdtF/Eq+3eNqK+mCR+52tMih21xzfMtHDThjkj5 ih5pmu+8DgFG2hPyAVyBBV2TMei/2OWf4UCCocgBeuWVaNtfFVbIwyI0iO5ckRTDzpDW 2PiicujK24Zch+LKwtRp8DIUKRFvkPzdGijPMWHqoooAP8XffzQgti6fa04zAN8oRAY3 8PmHm0zbSNd4WJz7+bJgb/E2juq+BMQnCDposzhqdi5Orl3v8I4ZnWtoDWcHo++FZrs1 W0PQ== 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=RDh3qIP0EkPmHWbC7nlJMtgw3a1wPx1g0mzVJyhYnj4=; b=CZYDo71cp0bHwXmKkEImTn+1B9Xejqc12feykp2JRXKYbQHdbrjugnS3GIYUQU5RIg wF2iWAQc/AfXYNWBjazOF0sZvLxKsJ9RJ7sEJvWMi5/Xc324Kt4edLjPkNsxfK/fNssz MvuIcTxsiY6nxcnBvSrc1MvRC2r6tMrsSIaocsnkAyaUQGmkbqK7500KfwbuI1aunX19 /40I5Vjr13w3RegSVVQbGAmFsvaWLA4hz4udK3wvraICB7QIfIns9f2etGlx8heFrguM MkvB6paDRasBGISmjL05sKvQneWwIXGY+mA3dV23DUfILgEULVxuFAL0Tz+tzo0WpsAs Fu4g== X-Gm-Message-State: AJIora++GNdKA0PfgHc8rAdVpylI99dnaTEYsT7QbfJ6auAcT9wgns0B 3MJW5CMQLiezgnVSco6cNXU= X-Google-Smtp-Source: AGRyM1uxCKV7tXnHAd6nGbZ4Ns1dlp37KQA5geg9Iy055Suskpkcz0UnUhweF6qfzVmkh9E8Xk886w== X-Received: by 2002:a37:ad09:0:b0:6a6:ae2b:9d54 with SMTP id f9-20020a37ad09000000b006a6ae2b9d54mr15982480qkm.424.1655727614762; Mon, 20 Jun 2022 05:20:14 -0700 (PDT) Original-Received: from localhost ([66.150.196.58]) by smtp.gmail.com with ESMTPSA id s3-20020a05620a0bc300b006a67d257499sm12766680qki.56.2022.06.20.05.20.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Jun 2022 05:20:14 -0700 (PDT) In-Reply-To: Received-SPF: pass client-ip=2607:f8b0:4864:20::736; envelope-from=yantar92@gmail.com; helo=mail-qk1-x736.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:291463 Archived-At: Stefan Monnier writes: >> When we increase the threshold, free increases up to some value, but >> that value is limited by the underlying code: > > A clarification: when you see > > [...] > GC-898 p=1.0 total=18.7M free=7.3M thresold=18.7M > GC-898 p=1.0 total=18.8M free=7.3M thresold=18.8M > [...] > ... Thanks! I was totally misreading the results. > The difference between the two cases is that when you have half of the > heap made up of dead objects, there's a higher probability that some of > those objects are clustered such that they make up a few complete > 16kB blocks, whereas when only the dead objects represent only 10% of > the heap, almost all 16kB blocks will contain a mis of dead and live > objects and hence can't be returned to the malloc library. I am again confused. Does what you say imply that frequent GC with small threshold is not good because it will have less dead objects and have higher chance of fragmentation? Best, Ihor