From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS4713 221.184.0.0/13 X-Spam-Status: No, score=-2.8 required=3.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, FORGED_GMAIL_RCVD,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, SPF_PASS shortcircuit=no autolearn=no autolearn_force=no version=3.4.2 Received: from neon.ruby-lang.org (neon.ruby-lang.org [221.186.184.75]) by dcvr.yhbt.net (Postfix) with ESMTP id AC78A20248 for ; Mon, 25 Mar 2019 00:52:14 +0000 (UTC) Received: from neon.ruby-lang.org (localhost [IPv6:::1]) by neon.ruby-lang.org (Postfix) with ESMTP id 7C8CF12140E; Mon, 25 Mar 2019 09:52:09 +0900 (JST) Received: from o1678948x4.outbound-mail.sendgrid.net (o1678948x4.outbound-mail.sendgrid.net [167.89.48.4]) by neon.ruby-lang.org (Postfix) with ESMTPS id 45ADF121526 for ; Mon, 25 Mar 2019 09:52:06 +0900 (JST) Received: by filter0074p3mdw1.sendgrid.net with SMTP id filter0074p3mdw1-20962-5C982634-1E 2019-03-25 00:52:04.587422412 +0000 UTC m=+539499.842262990 Received: from herokuapp.com (unknown [3.91.227.132]) by ismtpd0006p1iad2.sendgrid.net (SG) with ESMTP id D6d7FZMKSviBDYXYs3hMWw for ; Mon, 25 Mar 2019 00:52:04.465 +0000 (UTC) Date: Mon, 25 Mar 2019 00:52:04 +0000 (UTC) From: sam.saffron@gmail.com Message-ID: References: Mime-Version: 1.0 X-Redmine-MailingListIntegration-Message-Ids: 67454 X-Redmine-Project: ruby-trunk X-Redmine-Issue-Id: 15667 X-Redmine-Issue-Author: sam.saffron X-Redmine-Sender: sam.saffron X-Mailer: Redmine X-Redmine-Host: bugs.ruby-lang.org X-Redmine-Site: Ruby Issue Tracking System X-Auto-Response-Suppress: All Auto-Submitted: auto-generated X-SG-EID: =?us-ascii?Q?GD31AXMrLYtZC3ZmvheLkg5nAqKYtjT=2Fa5aksj98ZWMhoK1br8ehVrbn1mlh59?= =?us-ascii?Q?D+zc9dd6pBorROd+3gMg8YFoJ0X5F9dNjsyLPxS?= =?us-ascii?Q?cLeijklI6hczEeU2Ni0tOiK6AGMK8wEwG7k=2FpPk?= =?us-ascii?Q?=2FOkF6yiy021C=2FkgiwtbFv+NArFvyvvlL1psV3fy?= =?us-ascii?Q?snBPs9n9mM6IxYHkpBlRcMGdMq0E6GFOMdw=3D=3D?= To: ruby-core@ruby-lang.org X-ML-Name: ruby-core X-Mail-Count: 91968 Subject: [ruby-core:91968] [Ruby trunk Feature#15667] Introduce malloc_trim(0) in full gc cycles X-BeenThere: ruby-core@ruby-lang.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Ruby developers List-Id: Ruby developers List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ruby-core-bounces@ruby-lang.org Sender: "ruby-core" Issue #15667 has been updated by sam.saffron (Sam Saffron). @mame / @carlos, absolutely, I just need a few more days here, mounting this kind of test is not trivial even with docker containers. ---------------------------------------- Feature #15667: Introduce malloc_trim(0) in full gc cycles https://bugs.ruby-lang.org/issues/15667#change-77300 * Author: sam.saffron (Sam Saffron) * Status: Open * Priority: Normal * Assignee: * Target version: ---------------------------------------- Per Hongli's excellent article it looks like malloc_trim can help tremendously with memory bloat issues. https://www.joyfulbikeshedding.com/blog/2019-03-14-what-causes-ruby-memory-bloat.html#a-magic-trick-trimming I would like to get this patch tested side-by-side at Discourse, GitHub and Shopify. If it looks good I think this is both a great candidate for 2.7 and and 2.4,2.5,2.6 backports. Will coordinate with Shopify and GitHub to see if we can get numbers posted here, I will run tests on a live Discourse instance over the next week and report numbers here. Koichi, what are your thoughts, to me this looks like an incredibly safe patch, the amount of work added to major GCs is tiny compared to the potential benefit, walking all pages is a very cheap operation. ---Files-------------------------------- ruby_gc_malloc_trim.patch (1011 Bytes) -- https://bugs.ruby-lang.org/