> -----Original Message----- > From: linux-btrfs-owner@xxxxxxxxxxxxxxx <linux-btrfs- > owner@xxxxxxxxxxxxxxx> On Behalf Of Goffredo Baroncelli > Sent: Sunday, 5 April 2020 6:27 PM > To: linux-btrfs@xxxxxxxxxxxxxxx > Cc: Michael <mclaud@xxxxxxxxxxxxxx>; Hugo Mills <hugo@xxxxxxxxxxxxx>; > Martin Svec <martin.svec@xxxxxxxx>; Wang Yugui <wangyugui@e16- > tech.com>; Goffredo Baroncelli <kreijack@xxxxxxxxx> > Subject: [PATCH] btrfs: add ssd_metadata mode > > From: Goffredo Baroncelli <kreijack@xxxxxxxxx> > > When this mode is enabled, the allocation policy of the chunk is so modified: > - allocation of metadata chunk: priority is given to ssd disk. > - allocation of data chunk: priority is given to a rotational disk. > > When a striped profile is involved (like RAID0,5,6), the logic is a bit more > complex. If there are enough disks, the data profiles are stored on the > rotational disks only; instead the metadata profiles are stored on the non > rotational disk only. > If the disks are not enough, then the profiles is stored on all the disks. > > Example: assuming that sda, sdb, sdc are ssd disks, and sde, sdf are rotational > ones. > A data profile raid6, will be stored on sda, sdb, sdc, sde, sdf (sde and sdf are > not enough to host a raid5 profile). > A metadata profile raid6, will be stored on sda, sdb, sdc (these are enough to > host a raid6 profile). > > To enable this mode pass -o ssd_metadata at mount time. > > Signed-off-by: Goffredo Baroncelli <kreijack@xxxxxxxxx> Tested-By: Paul Jones <paul@xxxxxxxxxxxxxxx> Using raid 1. Makes a surprising difference in speed, nearly as fast as when I was using dm-cache Paul.
