linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] btrfs: basic tier support
@ 2020-10-29  5:35 wangyugui
  2020-10-29  5:35 ` [PATCH 1/4] btrfs: add tier score to device wangyugui
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: wangyugui @ 2020-10-29  5:35 UTC (permalink / raw)
  To: linux-btrfs; +Cc: kreijack, wangyugui

Storage tier is a big feature, this is just a basic support.

1) Add tier score to device
We use a single score value to define the tier level of a device.
Different score means different tier, and bigger score is faster.
    DAX device(dax=1)
    SSD device(rotational=0)
    HDD device(rotational=1)
TODO/FIXME: FIXME: detect bus(DIMM, NVMe, SCSI, SATA, Virtio, ...)
TODO/FIXME: user-assigned property(refactoring the coming 'read_preferred' property?) to
            set to the max score for some not-well-supported case.

In most case, only 1 or 2 tiers are used at the same time, so we group them into
top tier and other tier(s).


2) tiering data and metadata
This based the patch 'btrfs: add ssd_metadata mode' from Goffredo Baroncelli <kreijack@libero.it>

We define a mount option to tiering data/metadata to slower/faster device(s)
When there is only 1 tier, tiering is auto disabled.

mount option: tier[={off|auto|data_tier_X/metadata_tier_Y}]
default is 'tier[=auto]'. 'tier' is same as 'tier=auto', 'tier=OF/TF'
the policies to use the device(s):
    Top-tier-Only(TO)       : metadata only use top-tier device.
    Top-tier-Firstly(TF)    : metadata use top-tier device firstly.
    Other-tier-First(OF)    : data use other-tier device firstly.
    Other-tier-Only(OO)     : data only use other-tier device.
data_tier_X is the policy for data, support OF, OO.
metadata_tier_Y is the policy for metadata and system, support TF.


3) tier-aware mirror path select
This feature help the read performance, so it is enabled even if tier=off.


4) tier-aware free space cacl
Detect some case of free space 0 because of tier policy of data.
Full support is yet TODO/FIXME.


5) TODO/FIXME: per-subvol tiering policy and then per-subvol profile(RAID)
	per-subvol tiering policy and then per-subvol data profile(RAID) is needed for the full tier support.
		data policy support TO, TF too, in addition to OF, OO.
	But now as a workaround, we can keep them as 2 separated btrfs file system with disk partition and
	'btrfs filesystem resize'.


wangyugui (4):
  btrfs: add tier score to device
  btrfs: tiering data and metadata
  btrfs: tier-aware mirror path select
  btrfs: tier-aware free space cacl

 fs/btrfs/ctree.h   |  17 +++++++
 fs/btrfs/super.c   |  90 ++++++++++++++++++++++++++++++++++
 fs/btrfs/volumes.c | 119 +++++++++++++++++++++++++++++++++++++++++++--
 fs/btrfs/volumes.h |   5 ++
 4 files changed, 228 insertions(+), 3 deletions(-)

-- 
2.29.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-10-29  7:47 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-29  5:35 [PATCH 0/4] btrfs: basic tier support wangyugui
2020-10-29  5:35 ` [PATCH 1/4] btrfs: add tier score to device wangyugui
2020-10-29  5:35 ` [PATCH 2/4] btrfs: tiering data and metadata wangyugui
2020-10-29  5:35 ` [PATCH 3/4] btrfs: tier-aware mirror path select wangyugui
2020-10-29  5:35 ` [PATCH 4/4] btrfs: tier-aware free space cacl wangyugui

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).