From 19ccf3655fbb88ee9b35ef6a6500e8a8e44c9967 Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Sat, 24 Apr 2021 19:36:52 +0800 Subject: [PATCH] doc/cephfs/mds-config-ref: render options using confval directive less repeating, better maintanability this way Signed-off-by: Kefu Chai --- doc/cephfs/mds-config-ref.rst | 129 +++--------------------------- src/common/options/global.yaml.in | 6 ++ src/common/options/mds.yaml.in | 17 +++- 3 files changed, 35 insertions(+), 117 deletions(-) diff --git a/doc/cephfs/mds-config-ref.rst b/doc/cephfs/mds-config-ref.rst index 741f6c92bf2d7..6f4b045c85b1b 100644 --- a/doc/cephfs/mds-config-ref.rst +++ b/doc/cephfs/mds-config-ref.rst @@ -2,122 +2,19 @@ MDS Config Reference ====================== -``mds_cache_memory_limit`` - -:Description: The memory limit the MDS should enforce for its cache. -:Type: 64-bit Integer Unsigned -:Default: ``4G`` - -``mds_cache_reservation`` - -:Description: The cache reservation (memory or inodes) for the MDS cache to maintain. - Once the MDS begins dipping into its reservation, it will recall - client state until its cache size shrinks to restore the - reservation. -:Type: Float -:Default: ``0.05`` - - -``mds_cache_mid`` - -:Description: The insertion point for new items in the cache LRU - (from the top). - -:Type: Float -:Default: ``0.7`` - - -``mds_dir_commit_ratio`` - -:Description: The fraction of directory that is dirty before Ceph commits using - a full update (instead of partial update). - -:Type: Float -:Default: ``0.5`` - - -``mds_dir_max_commit_size`` - -:Description: The maximum size of a directory update before Ceph breaks it into - smaller transactions (MB). - -:Type: 32-bit Integer -:Default: ``10`` - - -``mds_decay_halflife`` - -:Description: The half-life of MDS cache temperature. -:Type: Float -:Default: ``5`` - -``mds_beacon_interval`` - -:Description: The frequency (in seconds) of beacon messages sent - to the monitor. - -:Type: Float -:Default: ``4`` - - -``mds_beacon_grace`` - -:Description: The interval without beacons before Ceph declares an MDS laggy - (and possibly replace it). - -:Type: Float -:Default: ``15`` - - -``mds_blocklist_interval`` - -:Description: The blocklist duration for failed MDSs in the OSD map. Note, - this controls how long failed MDS daemons will stay in the - OSDMap blocklist. It has no effect on how long something is - blocklisted when the administrator blocklists it manually. For - example, ``ceph osd blocklist add`` will still use the default - blocklist time. -:Type: Float -:Default: ``24.0*60.0`` - - -``mds_reconnect_timeout`` - -:Description: The interval (in seconds) to wait for clients to reconnect - during MDS restart. - -:Type: Float -:Default: ``45`` - - -``mds_tick_interval`` - -:Description: How frequently the MDS performs internal periodic tasks. -:Type: Float -:Default: ``5`` - - -``mds_dirstat_min_interval`` - -:Description: The minimum interval (in seconds) to try to avoid propagating - recursive stats up the tree. - -:Type: Float -:Default: ``1`` - -``mds_scatter_nudge_interval`` - -:Description: How quickly dirstat changes propagate up. -:Type: Float -:Default: ``5`` - - -``mds_client_prealloc_inos`` - -:Description: The number of inode numbers to preallocate per client session. -:Type: 32-bit Integer -:Default: ``1000`` - +.. confval:: mds_cache_memory_limit +.. confval:: mds_cache_reservation +.. confval:: mds_cache_mid +.. confval:: mds_dir_max_commit_size +.. confval:: mds_decay_halflife +.. confval:: mds_beacon_interval +.. confval:: mds_beacon_grace +.. confval:: mon_mds_blocklist_interval +.. confval:: mds_reconnect_timeout +.. confval:: mds_tick_interval +.. confval:: mds_dirstat_min_interval +.. confval:: mds_scatter_nudge_interval +.. confval:: mds_client_prealloc_inos ``mds_early_reply`` diff --git a/src/common/options/global.yaml.in b/src/common/options/global.yaml.in index ebb9ca3fe7d98..459740da59ffe 100644 --- a/src/common/options/global.yaml.in +++ b/src/common/options/global.yaml.in @@ -3156,6 +3156,12 @@ options: level: dev desc: Duration in seconds that blocklist entries for MDS daemons remain in the OSD map + fmt_desc: The blocklist duration for failed MDSs in the OSD map. Note, + this controls how long failed MDS daemons will stay in the + OSDMap blocklist. It has no effect on how long something is + blocklisted when the administrator blocklists it manually. For + example, ``ceph osd blocklist add`` will still use the default + blocklist time. default: 1_day services: - mon diff --git a/src/common/options/mds.yaml.in b/src/common/options/mds.yaml.in index 734258646e051..80edde2ff8501 100644 --- a/src/common/options/mds.yaml.in +++ b/src/common/options/mds.yaml.in @@ -95,6 +95,10 @@ options: type: float level: advanced desc: amount of memory to reserve for future cached objects + fmt_desc: The cache reservation (memory or inodes) for the MDS cache to maintain. + Once the MDS begins dipping into its reservation, it will recall + client state until its cache size shrinks to restore the + reservation. default: 0.05 services: - mds @@ -111,6 +115,8 @@ options: type: float level: advanced desc: midpoint for MDS cache LRU + fmt_desc: The insertion point for new items in the cache LRU + (from the top). default: 0.7 services: - mds @@ -144,6 +150,8 @@ options: type: int level: advanced desc: maximum size in megabytes for a RADOS write to a directory + fmt_desc: The maximum size of a directory update before Ceph breaks it into + smaller transactions (MB). default: 10 services: - mds @@ -167,7 +175,7 @@ options: - name: mds_beacon_interval type: float level: advanced - desc: interval in seconds between MDS beacons to monitors + desc: interval in seconds between MDS beacon messages sent to monitors default: 4 services: - mds @@ -176,6 +184,8 @@ options: type: float level: advanced desc: tolerance in seconds for missed MDS beacons to monitors + fmt_desc: The interval without beacons before Ceph declares an MDS laggy + (and possibly replace it). default: 15 services: - mds @@ -383,6 +393,7 @@ options: type: float level: advanced desc: time in seconds between upkeep tasks + fmt_desc: How frequently the MDS performs internal periodic tasks. default: 5 services: - mds @@ -394,12 +405,15 @@ options: default: 1 services: - mds + fmt_desc: The minimum interval (in seconds) to try to avoid propagating + recursive stats up the tree. with_legacy: true # how quickly dirstat changes propagate up the hierarchy - name: mds_scatter_nudge_interval type: float level: advanced desc: minimum interval between scatter lock updates + fmt_desc: How quickly dirstat changes propagate up. default: 5 services: - mds @@ -408,6 +422,7 @@ options: type: int level: advanced desc: number of unused inodes to pre-allocate to clients for file creation + fmt_desc: The number of inode numbers to preallocate per client session. default: 1000 services: - mds -- 2.39.5