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=-0.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS 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 73069C35242 for ; Fri, 14 Feb 2020 20:07:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 30030222C4 for ; Fri, 14 Feb 2020 20:07:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389039AbgBNUHC (ORCPT ); Fri, 14 Feb 2020 15:07:02 -0500 Received: from mail.nethype.de ([5.9.56.24]:47641 "EHLO mail.nethype.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388678AbgBNUHB (ORCPT ); Fri, 14 Feb 2020 15:07:01 -0500 Received: from [10.0.0.5] (helo=doom.schmorp.de) by mail.nethype.de with esmtp (Exim 4.92) (envelope-from ) id 1j2hEq-002DBL-6l; Fri, 14 Feb 2020 20:07:00 +0000 Received: from [10.0.0.1] (helo=cerebro.laendle) by doom.schmorp.de with esmtp (Exim 4.92) (envelope-from ) id 1j2hEq-0001O1-10; Fri, 14 Feb 2020 20:07:00 +0000 Received: from root by cerebro.laendle with local (Exim 4.92) (envelope-from ) id 1j2hEq-00020a-0c; Fri, 14 Feb 2020 21:07:00 +0100 Date: Fri, 14 Feb 2020 21:07:00 +0100 From: Marc Lehmann To: Filipe Manana Cc: linux-btrfs Subject: Re: cpu bound I/O behaviour in linux 5.4 (possibly others) Message-ID: <20200214200659.GA7612@schmorp.de> References: <20200214113027.GA6855@schmorp.de> <7a472107-ab87-d787-9f4f-d0d0e148061a@suse.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: OpenPGP: id=904ad2f81fb16978e7536f726dea2ba30bc39eb6; url=http://pgp.schmorp.de/schmorp-pgpkey.txt; preference=signencrypt Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org On Fri, Feb 14, 2020 at 12:20:46PM +0000, Filipe Manana wrote: > So you can't deduce that the free space cache is being used, and > despite being the default, it was not mentioned by Marc if he's not > using already the free space tree (-o space_cache=v2). Today, during an idle period, I stopped the news process, waited 15 minutes for I/O tand CPU to become mostly idle, and did this: # mount -noremount,clear_cache,space_cache=v1 /localvol5 # mount -noremount,clear_cache,space_cache=v2 /localvol5 Which, to my surprise, didn't make btrfs complain too much: [1378546.558533] BTRFS info (device dm-17): force clearing of disk cache [1378546.558536] BTRFS info (device dm-17): enabling disk space caching [1378546.558537] BTRFS info (device dm-17): disk space caching is enabled [1378553.868438] BTRFS info (device dm-17): enabling free space tree [1378553.868440] BTRFS info (device dm-17): using free space tree I don't know if this was effective in clearing the cache, but it didn't change the behaviour - as soon as the new process started writing files again, it was at 100% cpu. -- The choice of a Deliantra, the free code+content MORPG -----==- _GNU_ http://www.deliantra.net ----==-- _ generation ---==---(_)__ __ ____ __ Marc Lehmann --==---/ / _ \/ // /\ \/ / schmorp@schmorp.de -=====/_/_//_/\_,_/ /_/\_\