Whamcloud - gitweb
LU-15216 lmv: improve MDT QOS space balance
authorLai Siyao <lai.siyao@whamcloud.com>
Sat, 6 Nov 2021 19:16:49 +0000 (15:16 -0400)
committerAndreas Dilger <adilger@whamcloud.com>
Sun, 14 Nov 2021 03:02:51 +0000 (03:02 +0000)
commitc4719ee350a0beaebfb2ac934c2416aed6fe9257
tree36f1fbc3935706eaf719a7e3309028e5aae932e0
parente06100372fa9a0bc844ac4c6b652e5ea60a771f7
LU-15216 lmv: improve MDT QOS space balance

When MDTs are not balanced, QOS code tries to keep subdirectory
creation local to the same MDT when it is deep in the directory
tree, to avoid creating too many remote directories, but the
existing weight to stay on the parent MDT until 50% of other MDTs
is too radical, and causes mkdirs to be "stuck" on the same MDT.

* remove "lq_threshold_rr" from above calculation because the check
  in ltd_qos_is_usable() handles this, so use only "dir_depth".
* the factor is changed to "16 / (dir_depth + 10)", then it's less
  likely to stick to the parent MDT for top levels, while more
  likely to stay on the parent MDT for low levels:
  depth=0 -> 160%, depth=4 -> 114%, depth=6 -> 100%,
  depth=8 -> 88%, depth=12 -> 72%
* rename lli_depth to lli_dir_depth to make usage more clear.

Lustre-change: https://review.whamcloud.com/45544
Lustre-commit: TBD (from 95398b056f7a88ec7830da353170e8993cecf036)

Signed-off-by: Lai Siyao <lai.siyao@whamcloud.com>
Change-Id: Iec6b77919b630d4baee6d54bee7bdb8ca9fb8574
Reviewed-on: https://review.whamcloud.com/45556
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Hongchao Zhang <hongchao@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Andreas Dilger <adilger@whamcloud.com>
lustre/llite/dir.c
lustre/llite/llite_internal.h
lustre/llite/llite_lib.c
lustre/llite/namei.c
lustre/lmv/lmv_obd.c