From 0d094f8f527e566e0713c408b8723b1ae2fe2fa0 Mon Sep 17 00:00:00 2001 From: dparmar18 Date: Mon, 4 Jul 2022 14:26:47 +0530 Subject: [PATCH] doc/cephfs/dirfrags: clarify the unit of threshold limits Rationale: There are many threshold limits for split and merge in this doc that just says like: "A directory fragment is eligible for splitting when its size exceeds `mds_bal_split_size` (default 10000)". Need to clarify what 10000 actually means. This applies to all other such entries in this doc. Signed-off-by: Dhairya Parmar --- doc/cephfs/dirfrags.rst | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/doc/cephfs/dirfrags.rst b/doc/cephfs/dirfrags.rst index d53e0c06066..9f177c19f44 100644 --- a/doc/cephfs/dirfrags.rst +++ b/doc/cephfs/dirfrags.rst @@ -46,8 +46,8 @@ Size thresholds =============== A directory fragment is eligible for splitting when its size exceeds -``mds_bal_split_size`` (default 10000). Ordinarily this split is -delayed by ``mds_bal_fragment_interval``, but if the fragment size +``mds_bal_split_size`` (default 10000 directory entries). Ordinarily this +split is delayed by ``mds_bal_fragment_interval``, but if the fragment size exceeds a factor of ``mds_bal_fragment_fast_factor`` the split size, the split will happen immediately (holding up any client metadata IO on the directory). @@ -58,14 +58,15 @@ ENOSPC errors if they try to create files in the fragment. On a properly configured system, this limit should never be reached on ordinary directories, as they will have split long before. By default, this is set to 10 times the split size, giving a dirfrag size limit of -100000. Increasing this limit may lead to oversized directory fragment -objects in the metadata pool, which the OSDs may not be able to handle. +100000 directory entries. Increasing this limit may lead to oversized +directory fragment objects in the metadata pool, which the OSDs may not +be able to handle. A directory fragment is eligible for merging when its size is less than ``mds_bal_merge_size``. There is no merge equivalent of the "fast splitting" explained above: fast splitting exists to avoid creating oversized directory fragments, there is no equivalent issue -to avoid when merging. The default merge size is 50. +to avoid when merging. The default merge size is 50 directory entries. Activity thresholds =================== @@ -79,16 +80,19 @@ operations on directory fragments. The decaying load counters have an exponential decay based on the ``mds_decay_halflife`` setting. On writes, the write counter is -incremented, and compared with ``mds_bal_split_wr``, triggering a +incremented, and compared with ``mds_bal_split_wr``, triggering a split if the threshold is exceeded. Write operations include metadata IO -such as renames, unlinks and creations. +such as renames, unlinks and creations. The ``mds_bal_split_rd`` threshold is applied based on the read operation load counter, which tracks readdir operations. -By the default, the read threshold is 25000 and the write threshold is -10000, i.e. 2.5x as many reads as writes would be required to trigger -a split. +The ``mds_bal_split_rd`` and ``mds_bal_split_wr`` configs represent the +popularity threshold. In the MDS these are measured as "read/write temperatures" +which is closely related to the number of respective read/write operations. +By default, the read threshold is 25000 operations and the write +threshold is 10000 operations, i.e. 2.5x as many reads as writes would be +required to trigger a split. After fragments are split due to the activity thresholds, they are only merged based on the size threshold (``mds_bal_merge_size``), so