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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id DAC06C433F5 for ; Tue, 15 Mar 2022 18:34:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1350956AbiCOSgK (ORCPT ); Tue, 15 Mar 2022 14:36:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58280 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242083AbiCOSgJ (ORCPT ); Tue, 15 Mar 2022 14:36:09 -0400 Received: from vps.thesusis.net (vps.thesusis.net [34.202.238.73]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7D5FF483B2 for ; Tue, 15 Mar 2022 11:34:57 -0700 (PDT) Received: by vps.thesusis.net (Postfix, from userid 1000) id A0CBD83A5F; Tue, 15 Mar 2022 14:34:56 -0400 (EDT) References: <3c668ffe-edb0-bbbb-cfe0-e307bad79b1a@gmx.com> <70bc749c-4b85-f7e6-b5fd-23eb573aab70@gmx.com> <7fc9f5b4-ddb6-bd3b-bb02-2bd4af703e3b@gmx.com> <078f9f05-3f8f-eef1-8b0b-7d2a26bf1f97@gmx.com> <87a6dscn20.fsf@vps.thesusis.net> User-agent: mu4e 1.7.0; emacs 27.1 From: Phillip Susi To: Zygo Blaxell Cc: Qu Wenruo , Jan Ziak <0xe2.0x9a.0x9b@gmail.com>, linux-btrfs@vger.kernel.org Subject: Re: Btrfs autodefrag wrote 5TB in one day to a 0.5TB SSD without a measurable benefit Date: Tue, 15 Mar 2022 14:28:46 -0400 In-reply-to: Message-ID: <87fsnjnjxr.fsf@vps.thesusis.net> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org Zygo Blaxell writes: > btrfs extents are immutable, so the filesystem can't extend an existing > extent with new data. Instead, a new extent must be created that contains > both the old and new data to replace the old extent. At least one new Wait, what? How is an extent immutable? Why isn't a new tree written out with a larger extent and once the transaction commits, bam... you've enlarged your extent? Just like modifying any other data. And do you mean to say that before the new data can be written, the old data must first be read in and moved to the new extent? That seems horridly inefficient.