Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp2292870pxv; Sat, 24 Jul 2021 11:16:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyi/OV6PMegcccpo3zsRfzEvm1THeln5KgDZ6JIIn27fHM+riX0HUPozRibN+ioXa/zjUop X-Received: by 2002:aa7:c857:: with SMTP id g23mr12087115edt.100.1627150570436; Sat, 24 Jul 2021 11:16:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627150570; cv=none; d=google.com; s=arc-20160816; b=nYHEUoh3JbarV3Sgw9GkIhdkqHrlPoGkVpMu8DNE9eOvnW13Ob8yaeWzMb+tinf8K5 xwdJJvSbVNHtDVKIeTsn+1IRZ/VRLgaUl4hAbcLKYLAoeG+GAtAkRF1mJNfhNmVT2i7g Hm/0ExTLKg7ya3OEfR9ka4nZYtf1II/ozY0e3zI7a39cqz4OtVl74SC8v83HE+OLjtxp ywRntVR0RQP+ej6PXfOlecgy3pgKknHcZ3UKI1ji54KigPmJeTYei4UOK97BxrfwzzgC smjyeOtPWjAMfiWqR5njXfpyLGRHark2cOSML/tCgi0E1/m2BJz/y5cxXPZWpCTOJ1zB 5LpA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=w8yKGTD/K4w2fC7pZFl5Bs3NRSbkCF/Y0TLmM7Sde20=; b=auHSjYrBkRkYiptbOxX43BTNgXpdY9xgnE1gdFwq4rlsZiNQFp5Zcfs3bTsY8TtJEn iqmlj3VHBW3+YufKdIWgPUY0t9c/P/3fOJuylFRlGzcTVsXGR58QtNfdg0X3gAzirwrh y02t0Ku7ZTa8WLE9HlKJXsRjwchB46H4ieyyv0XOU/r9y9ngfk7ZxSe1398QHw3Oy0KA 2k3UX5wMsZYCXrhKOuclQJLSevsobaHkiTd2drq3vln83dDNCnC2OKdZ2EKQVGn3tfKo BlIJyFoEWm1ZGIos8T5hzyYnGeT5AodOvJWt6C1kgkJnlGsZwn8hcxjrT0GIw0A+t7UD 2mAw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=l3twtMHx; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f14si35824329ejx.84.2021.07.24.11.15.47; Sat, 24 Jul 2021 11:16:10 -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=@infradead.org header.s=casper.20170209 header.b=l3twtMHx; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229813AbhGXRdx (ORCPT + 99 others); Sat, 24 Jul 2021 13:33:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36748 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229655AbhGXRdx (ORCPT ); Sat, 24 Jul 2021 13:33:53 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CC88EC061575; Sat, 24 Jul 2021 11:14:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=w8yKGTD/K4w2fC7pZFl5Bs3NRSbkCF/Y0TLmM7Sde20=; b=l3twtMHxEoCrMzv/WZ2WQYxlgE fFExxVJhEit1ghlINmX1ue8wIBc8CaCq7YziFHUe1MKap/XZje8Ujcu9UDuSkwSLPdirHlV/NYxGE i0m7iM8fyMOt6/+Hvc0qquHlEWDf0lUGtavMG2C2+piXlkftDYnEM0CcstMNz4AU1m0MrFq5YTcXP YBFh2cfXasMuHxQVznQyudJdMs19qOIIxR6E9LwWo9ZT6aPP/laK8BB+01sIUGzOFsz1qX2cxUrEu fMJIKVYr/+CD7S1eLHXVYGY+j+Iv2zEgjSMvORafDqSjhr++LlwuTg+th23/0nX3Bp7PzEEQKkXPn 3L7E02ww==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1m7MAA-00CSBO-B0; Sat, 24 Jul 2021 18:14:15 +0000 Date: Sat, 24 Jul 2021 19:14:14 +0100 From: Matthew Wilcox To: James Bottomley 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 Subject: Re: Folios give an 80% performance win Message-ID: References: <20210715033704.692967-1-willy@infradead.org> <1e48f7edcb6d9a67e8b78823660939007e14bae1.camel@HansenPartnership.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1e48f7edcb6d9a67e8b78823660939007e14bae1.camel@HansenPartnership.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 test 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. 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?