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=-2.3 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,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 EA9CDC2BA19 for ; Sun, 5 Apr 2020 21:58:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C37C020659 for ; Sun, 5 Apr 2020 21:58:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727817AbgDEV6I (ORCPT ); Sun, 5 Apr 2020 17:58:08 -0400 Received: from tartarus.angband.pl ([54.37.238.230]:44678 "EHLO tartarus.angband.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726887AbgDEV6H (ORCPT ); Sun, 5 Apr 2020 17:58:07 -0400 Received: from kilobyte by tartarus.angband.pl with local (Exim 4.92) (envelope-from ) id 1jLDHH-00010y-Vn; Sun, 05 Apr 2020 23:58:03 +0200 Date: Sun, 5 Apr 2020 23:58:03 +0200 From: Adam Borowski To: kreijack@inwind.it Cc: Graham Cobb , linux-btrfs@vger.kernel.org Subject: Re: [RFC][PATCH V3] btrfs: ssd_metadata: storing metadata on SSD Message-ID: <20200405215803.GA21928@angband.pl> References: <20200405082636.18016-1-kreijack@libero.it> <58e315a1-0307-9a26-8fb4-fd5220c1d5a6@cobb.uk.net> <4f10882a-fa89-25e0-901c-aff8010d46cd@libero.it> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <4f10882a-fa89-25e0-901c-aff8010d46cd@libero.it> X-Junkbait: aaron@angband.pl, zzyx@angband.pl User-Agent: Mutt/1.10.1 (2018-07-13) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: kilobyte@angband.pl X-SA-Exim-Scanned: No (on tartarus.angband.pl); SAEximRunCond expanded to false Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org On Sun, Apr 05, 2020 at 08:47:15PM +0200, Goffredo Baroncelli wrote: > Currently BTRFS allocates the chunk on the basis of the free space. > > For my tests I have a smaller ssd (20GB) and a bigger hdd (230GB). > This means that the latter has higher priority for the allocation, > until the free space became equal. > > The rationale behind my patch is the following: > - is quite simple (even tough in 3 iteration I put two errors :-) ) > - BTRFS has already two kind of information to store: data and metadata. > The former is (a lot ) bigger, than the latter. Having two kind of storage, > one faster (and expensive) than the other, it is natural to put the metadata > in the faster one, and the data in the slower one. But why do you assume that SSD means fast? Even with traditional disks only, you can have a SATA-connected array for data and NVMe for metadata, legacy NVMe for data and NVMe Optane for metadata -- but the real fun starts if you put metadata on Optane pmem. There are many storage tiers, and your patch hard-codes the lowest one as the only determinator. Meow! -- ⢀⣴⠾⠻⢶⣦⠀ ⣾⠁⢠⠒⠀⣿⡁ in the beginning was the boot and root floppies and they were good. ⢿⡄⠘⠷⠚⠋⠀ -- on #linux-sunxi ⠈⠳⣄⠀⠀⠀⠀