Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp2297769pxv; Sat, 24 Jul 2021 11:25:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxLpup2SG+jkbs6W2Nd8zhX9NSweYmDKX5+ukR3eJOLrvALpkxj/h28ZIyceu06EMld1xXr X-Received: by 2002:a17:906:dc0f:: with SMTP id yy15mr9778176ejb.255.1627151152066; Sat, 24 Jul 2021 11:25:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627151152; cv=none; d=google.com; s=arc-20160816; b=rh+uMEfVkkcobayRogxQhTy+Jwja4Isfs6Jz8kKm+uZ9JLqmyXNCDUcYPm55MTN8zT YsaC2RXw/wfVdVH2Rcc9pn2d/wtL1m4qul7kDaD2jPHEbZqxUzJdTXWUqInV2hhY+8We rwS5V2QOqLxJ90BPo9sZHI06eis0lablqR0t/PQiuCkxk8VWq5WTgb02Q2/Cc2Q/c2OM 1A9An/SH6Jx3ANtBkuDx9PaKQX+P52AkyjCkq/Uy3XF5aX7aoglUsV3FW7TkPR0Ug/uZ NJxGLFj1jZJ8/sqSZ7+f2vXsmslVg4hoQAtQK5ok2jcR8WAjIdml7Lk50icHRAKZwTxh sbVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id:dkim-signature:dkim-signature; bh=HQboH4jPosf8cIfl7SRM7o3g1uRhLZ3ErQAwlLn97E0=; b=mcbcmrP8LU01fmOeUgevYwIlyeJ4FTAbOlBuK/DIJZqT+0Cuf6JpgkmbhPZhEgs8a8 +8XgUwizN9/65S7DpbxcOaLEQnTjdD+Jp086H2KcONTRo9e9vaoTrBl+VxLrGpcUW0A5 fZmzuIpwswhH4MvOsLGk2T+VUjY7ZooWOEpN528+lJSNHIl5XON7wlVbcYLHJPi4Xn3j 28t5GI7lDqFsxdEYH9+TJPjLhc6CgZA9jJRGDQzsZr8s8Fv3ejChIDqj+yRw6jkZR4dE +BqVP74emfEcqsSzZl2HZfvrlm89UXKIHQOPzWxrzPqqN7orxDgSFrbFgumGFrAZY1Oh 2YUw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@hansenpartnership.com header.s=20151216 header.b=YEEPxFlA; dkim=pass header.i=@hansenpartnership.com header.s=20151216 header.b=YEEPxFlA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=hansenpartnership.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c6si34197600ejc.71.2021.07.24.11.25.27; Sat, 24 Jul 2021 11:25:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@hansenpartnership.com header.s=20151216 header.b=YEEPxFlA; dkim=pass header.i=@hansenpartnership.com header.s=20151216 header.b=YEEPxFlA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=hansenpartnership.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229938AbhGXRm5 (ORCPT + 99 others); Sat, 24 Jul 2021 13:42:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38744 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229530AbhGXRm4 (ORCPT ); Sat, 24 Jul 2021 13:42:56 -0400 Received: from bedivere.hansenpartnership.com (bedivere.hansenpartnership.com [IPv6:2607:fcd0:100:8a00::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4FBF2C061575; Sat, 24 Jul 2021 11:23:28 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by bedivere.hansenpartnership.com (Postfix) with ESMTP id 5670212804B8; Sat, 24 Jul 2021 11:23:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=hansenpartnership.com; s=20151216; t=1627151007; bh=fbGrVZPpfO8ojqmcjNkXJzHQko3i7pa0hWwlLZqllMc=; h=Message-ID:Subject:From:To:Date:In-Reply-To:References:From; b=YEEPxFlAmgXca92ncaVcjFkyPKS01sYb+gMbVo7x3mbWicxMdAhchlx6CBixALUKD KnYKz1LqGLUFhci2nJleUkzImqNvH9FTMRnwv5+F3nJlMHkllbfT/pgsYVdiawbqOC 3x4HLMbzZDTugEWFjRPDwZBz6RbFvgxdod9wbjW4= Received: from bedivere.hansenpartnership.com ([127.0.0.1]) by localhost (bedivere.hansenpartnership.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id uixCSrnBnUCL; Sat, 24 Jul 2021 11:23:27 -0700 (PDT) Received: from jarvis.int.hansenpartnership.com (unknown [IPv6:2601:600:8280:66d1::527]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by bedivere.hansenpartnership.com (Postfix) with ESMTPSA id B3AC212804A3; Sat, 24 Jul 2021 11:23:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=hansenpartnership.com; s=20151216; t=1627151007; bh=fbGrVZPpfO8ojqmcjNkXJzHQko3i7pa0hWwlLZqllMc=; h=Message-ID:Subject:From:To:Date:In-Reply-To:References:From; b=YEEPxFlAmgXca92ncaVcjFkyPKS01sYb+gMbVo7x3mbWicxMdAhchlx6CBixALUKD KnYKz1LqGLUFhci2nJleUkzImqNvH9FTMRnwv5+F3nJlMHkllbfT/pgsYVdiawbqOC 3x4HLMbzZDTugEWFjRPDwZBz6RbFvgxdod9wbjW4= Message-ID: Subject: Re: Folios give an 80% performance win From: James Bottomley To: Matthew Wilcox Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, Linus Torvalds , Andrew Morton , "Darrick J. Wong" , Christoph Hellwig , Andres Freund , Michael Larabel Date: Sat, 24 Jul 2021 11:23:25 -0700 In-Reply-To: References: <20210715033704.692967-1-willy@infradead.org> <1e48f7edcb6d9a67e8b78823660939007e14bae1.camel@HansenPartnership.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.34.4 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, 2021-07-24 at 19:14 +0100, Matthew Wilcox wrote: > On Sat, Jul 24, 2021 at 11:09:02AM -0700, James Bottomley wrote: > > On Sat, 2021-07-24 at 18:27 +0100, Matthew Wilcox wrote: > > > What blows me away is the 80% performance improvement for > > > PostgreSQL. I know they use the page cache extensively, so it's > > > plausibly real. I'm a bit surprised that it has such good > > > locality, and the size of the win far exceeds my > > > expectations. We should probably dive into it and figure out > > > exactly what's going on. > > > > Since none of the other tested databases showed more than a 3% > > improvement, this looks like an anomalous result specific to > > something in postgres ... although the next biggest db: mariadb > > wasn't part of the tests so I'm not sure that's > > definitive. Perhaps the next step should be to t > > est mariadb? Since they're fairly similar in domain (both full > > SQL) if mariadb shows this type of improvement, you can > > safely assume it's something in the way SQL databases handle paging > > and if it doesn't, it's likely fixing a postgres inefficiency. > > I think the thing that's specific to PostgreSQL is that it's a heavy > user of the page cache. My understanding is that most databases use > direct IO and manage their own page cache, while PostgreSQL trusts > the kernel to get it right. That's testable with mariadb, at least for the innodb engine since the flush_method is settable. > Regardless of whether postgres is "doing something wrong" or not, > do you not think that an 80% performance win would exert a certain > amount of pressure on distros to do the backport? Well, I cut the previous question deliberately, but if you're going to force me to answer, my experience with storage tells me that one test being 10x different from all the others usually indicates a problem with the benchmark test itself rather than a baseline improvement, so I'd wait for more data. James