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 14CFDC2BA83 for ; Fri, 14 Feb 2020 13:08:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DBD8C2086A for ; Fri, 14 Feb 2020 13:08:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729225AbgBNNIa (ORCPT ); Fri, 14 Feb 2020 08:08:30 -0500 Received: from mail.nethype.de ([5.9.56.24]:43633 "EHLO mail.nethype.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728036AbgBNNIa (ORCPT ); Fri, 14 Feb 2020 08:08:30 -0500 Received: from [10.0.0.5] (helo=doom.schmorp.de) by mail.nethype.de with esmtp (Exim 4.92) (envelope-from ) id 1j2aho-001scB-A1; Fri, 14 Feb 2020 13:08:28 +0000 Received: from [10.0.0.1] (helo=cerebro.laendle) by doom.schmorp.de with esmtp (Exim 4.92) (envelope-from ) id 1j2aH1-0008U9-Qs; Fri, 14 Feb 2020 12:40:47 +0000 Received: from root by cerebro.laendle with local (Exim 4.92) (envelope-from ) id 1j2aH1-0002D7-Lg; Fri, 14 Feb 2020 13:40:47 +0100 Date: Fri, 14 Feb 2020 13:40:47 +0100 From: Marc Lehmann To: Nikolay Borisov , Filipe Manana Cc: linux-btrfs@vger.kernel.org Subject: Re: cpu bound I/O behaviour in linux 5.4 (possibly others) Message-ID: <20200214124040.GA7686@schmorp.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7a472107-ab87-d787-9f4f-d0d0e148061a@suse.com> 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 First of all, thanks for the response - and if my mails are somehow off-topic for the list, also feelf ree to tell me :) On Fri, Feb 14, 2020 at 01:57:33PM +0200, Nikolay Borisov wrote: > > one core) in top: > > So this is a 50tb useful space, right? Yup, pretty full, too. I also forgot to mention that the vast majority of files are between 400kB and 2MB, and not, as one might expect from textgroups, a few kilobytes. > > [<0>] tree_search_offset.isra.0+0x16a/0x1d0 [btrfs] > > This points to freespace cache. One thing that I might suggest is try Hmm, I did switch to the free space tree on all larger filesystems long ago, or at least I thought so. I use these mount options on the fs in question: rw,noatime,nossd,space_cache=v2,commit=120,subvolid=5,subvol=/ I assume this is the correct way to get it (and your space_cache=2 is a typo, or an alternative?). So either I am not switching on the free space tree properly, or it's not the problem. I did notice major speedups form it in the past, though. > 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). Yes, sorry, it's alwayss hard to strike a balance between needed info and too much. > Switching from one to the other might make the problem go away, simply > because it cause free space to be scanned and build a new cache or > tree. So clearing the free space tree might also help? Can I do this while its mounted using remount or do I haver to umount/mount (or use btrfs check)? -- The choice of a Deliantra, the free code+content MORPG -----==- _GNU_ http://www.deliantra.net ----==-- _ generation ---==---(_)__ __ ____ __ Marc Lehmann --==---/ / _ \/ // /\ \/ / schmorp@schmorp.de -=====/_/_//_/\_,_/ /_/\_\