From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.5 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 627B8C4363A for ; Thu, 29 Oct 2020 15:17:14 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id A12B82076E for ; Thu, 29 Oct 2020 15:17:13 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=kernel-dk.20150623.gappssmtp.com header.i=@kernel-dk.20150623.gappssmtp.com header.b="JGEN+19l" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A12B82076E Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.dk Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id E99D96B0062; Thu, 29 Oct 2020 11:17:12 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id E4B7D6B0073; Thu, 29 Oct 2020 11:17:12 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D39776B0074; Thu, 29 Oct 2020 11:17:12 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id A1D446B0062 for ; Thu, 29 Oct 2020 11:17:12 -0400 (EDT) Received: from smtpin22.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 477CB1EF1 for ; Thu, 29 Oct 2020 15:17:12 +0000 (UTC) X-FDA: 77425316304.22.goose80_5b04b7b2728e Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin22.hostedemail.com (Postfix) with ESMTP id 1A8DE18038E68 for ; Thu, 29 Oct 2020 15:17:12 +0000 (UTC) X-HE-Tag: goose80_5b04b7b2728e X-Filterd-Recvd-Size: 6114 Received: from mail-il1-f169.google.com (mail-il1-f169.google.com [209.85.166.169]) by imf30.hostedemail.com (Postfix) with ESMTP for ; Thu, 29 Oct 2020 15:17:11 +0000 (UTC) Received: by mail-il1-f169.google.com with SMTP id k1so3369614ilc.10 for ; Thu, 29 Oct 2020 08:17:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20150623.gappssmtp.com; s=20150623; h=subject:from:to:cc:references:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=URRah6P1Ik5lRDaXItrPzleHEyLaVsdDbjuH5AM6Ltc=; b=JGEN+19lj10DLZf7MbGj/Q7yTVJLswvoIzEblW4Sgs1ZzTn0pW/gPQaABTIByWH08C jkU6yVOiAEDB7h3dGhCwpCZhpL3DtOjIfdAdthky8rIJFmNZZzpvBfERwnfZKg/sLhQJ bKGySwOZkdzNJQOlasXPp3GnVGUta0XcGzCSYargzY0VPZQklz/YYMqsnUCtZTAZEXpI HQpXsQvZYPADNUGyiy2s+5g/HTbbYZ5O2D9cPDpSFJz5lJHrPb+msvhu5ooGCtYi1YiN p1qamcAdrO+DyuQ7GeQSr9Z08sKFhsIqWds9KOUUnxglO8aXUumLDEJCrMGu9EnSZFvu MSYw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:from:to:cc:references:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=URRah6P1Ik5lRDaXItrPzleHEyLaVsdDbjuH5AM6Ltc=; b=b3A6PZggCbqMXltZ3l83KTNybU75yjU7COL0cYKiqH5lDQxlPe2eMbF3QxZ003+eQs u8vkHhQIWKYF1H5sgldHDVWgmehPvz5+rJWlXn897SKkGQuvQk9n0hlX8rGeMKXSfvMH T/KVrHiJLWae4+Ap7caC00d20k0CH8FSTE8LoFChcRbOuiN5CVcmpBDCMuK83U4k5UsK TNHng/3VetzL/mJBvYB+yI0yqkTUzLAzK8hK/CpMgkNquLvqHz/gwfyOOL9O3vM0n9Hf KE6IzPoX0W5eWluqaEcEOwNvxtyaImBMKdjFwFRBnpIaVob76E/gq1Vb/dcVXNoG2t/s k5Tw== X-Gm-Message-State: AOAM532Qa4FS4NapHXUbCavIYs9jkaGpIGnZtUmrvN5F3NUZ/rQN9hOd 5+Cq8CaznFvrOBHoi/Y8ED6oaNGkMJ9l0g== X-Google-Smtp-Source: ABdhPJyHI2u/gPgoTfhjpVjVlJSE27P5EF/k6j+AxnM1J4wZOGuKos2js3C5/DQwP2KKsYQp7HGJUQ== X-Received: by 2002:a92:d2ca:: with SMTP id w10mr3616343ilg.140.1603984630678; Thu, 29 Oct 2020 08:17:10 -0700 (PDT) Received: from [192.168.1.30] ([65.144.74.34]) by smtp.gmail.com with ESMTPSA id z9sm2447117ilm.21.2020.10.29.08.17.10 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 29 Oct 2020 08:17:10 -0700 (PDT) Subject: Re: + fs-break-generic_file_buffered_read-up-into-multiple-functions.patch added to -mm tree From: Jens Axboe To: Matthew Wilcox Cc: Andrew Morton , linux-mm@kvack.org, kent.overstreet@gmail.com References: <20201025220817.XxXVE%akpm@linux-foundation.org> <20201027133551.GW20115@casper.infradead.org> <20201028152235.125172e46ae70ba4d7094469@linux-foundation.org> <543aa047-f334-cc40-8466-51bff70ac3b3@kernel.dk> <20201029145759.GA27442@casper.infradead.org> <74d36f69-e14e-40e1-531e-edd1d2e3c344@kernel.dk> <20201029150342.GB27442@casper.infradead.org> <73eb7276-f326-c481-4936-6c6c125edfbc@kernel.dk> Message-ID: Date: Thu, 29 Oct 2020 09:17:09 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <73eb7276-f326-c481-4936-6c6c125edfbc@kernel.dk> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On 10/29/20 9:05 AM, Jens Axboe wrote: > On 10/29/20 9:03 AM, Matthew Wilcox wrote: >> On Thu, Oct 29, 2020 at 09:02:31AM -0600, Jens Axboe wrote: >>> On 10/29/20 8:57 AM, Matthew Wilcox wrote: >>>> On Thu, Oct 29, 2020 at 07:57:34AM -0600, Jens Axboe wrote: >>>>> On 10/28/20 4:26 PM, Jens Axboe wrote: >>>>>> I did see some wins when I tested this. I'll try and run some testing >>>>>> tomorrow and report back. If there's something specifically you want to >>>>>> see tested, let me know. >>>>> >>>>> I did some testing, unfortunately it's _very_ hard to produce somewhat >>>>> consistent and good numbers as it quickly becomes a game of kswapd. >>>>> Here's a basic case of 4 threads doing 32k random reads: >>>>> >>>>> PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND >>>>> 462 root 20 0 0 0 0 R 65.5 0.0 0:08.02 kswapd0 >>>>> 2287 axboe 20 0 1303448 2176 1072 R 46.6 0.0 0:05.35 fio >>>>> 2289 axboe 20 0 1303456 2196 1092 D 46.6 0.0 0:05.34 fio >>>>> 2290 axboe 20 0 1303460 2216 1112 D 46.6 0.0 0:05.37 fio >>>>> 2288 axboe 20 0 1303452 2224 1120 R 45.9 0.0 0:05.33 fio >>>>> >>>>> Sad face... Unfortunately once kswapd kicks in, performance also >>>>> plummets. This box only has 32G of ram, and you can fill that in less >>>>> than 10 seconds doing buffered reads like that. >>>>> >>>>> I ran 4k and 32k testing, and using 1 and 4 threads. But given the above >>>>> sadness, it quickly ends up looking the same for me. >>>> >>>> What if your workload actually fits in memory? That would seem to be >>>> the situation where Kent's patches would make a difference. >>> >>> That was my point, if I do multi-page reads then memory is filled in >>> seconds, which makes it pretty hard to provide any accurate numbers. I >>> don't have anything slow in this test box, I'll see if I can find >>> something to stick in it. >> >> I meant re-reading files which fit in memory, so you take ten seconds >> to fill the page cache, then read from the same files over and over. > > That I can certainly try. Reading a 16G file randomly for 10 seconds, using 1 or 4 threads and either 4k or 32k reads: test 5.10-rc1 5.10-rc1+kent ------------------------------------------------------------- 1 thread, 4k 976K 1030K (+5.5%) 4 threads, 4k 3462K 3453K (-0.3%) 1 thread, 32k 299K 322K (+7.7%) 4 threads, 32k 769K 785K (+2.0%) -- Jens Axboe