Whamcloud - gitweb
LU-12785 dom: adjust DOM stripe size by free space 04/37904/6
authorMikhail Pershin <mpershin@whamcloud.com>
Thu, 12 Mar 2020 09:53:37 +0000 (12:53 +0300)
committerOleg Drokin <green@whamcloud.com>
Thu, 7 May 2020 05:42:07 +0000 (05:42 +0000)
commitf2a3bbfb3f3fef910201259dd1827bf8c475da06
tree6c86c79cc6b54bfee9e57aa9c61f74a6f7daa6bb
parent4e8fcee92d75102314f6c39c72b9c2cbce109bd4
LU-12785 dom: adjust DOM stripe size by free space

Make DoM default stripe size dependent on filesystem free
space. If free space become less than some defined threshold
then DoM stripe size of new files is decreased along with
free space remaining up to zero. It will grow back up to
defined maximum when more free space occur.

- introduce new tunable lod.*.dom_threshold_free_mb as free
  space threshold below which default DOM stripe size will
  decrease down to zero. Units are MiB but it can be set also
  in percentage of free space:

  # lctl set_param lod.*.dom_threshold_free_mb=100GiB
  or
  # lctl set_param lod.*.dom_threshold_free_mb=10%

- rename lod.*.dom_stripesize to lod.*.dom_stripesize_max_kb to
  reflect that this is maximum limit for DOM stripe size on MDT,
  used as KiB value. Old lod.*.dom_stripesize is kept for
  compatibility.
- new read-only parameter lod.*.dom_stripesize_cur_kb to read
  current default DoM stripesize. It is autotuned depending on
  dom_threshold_free_mb parameter and amount of free space.
- OSD statfs data used in calculations are cached in LOD, so
  DoM default stripesize is not recalculated upon each create
  but happens not often that once per 10 sec and when tunables
  are being changed
- add corresponding test 270g in sanity.sh

Signed-off-by: Mikhail Pershin <mpershin@whamcloud.com>
Change-Id: Id27815ec38ae11762c74c0097c5862eaa3dbda24
Reviewed-on: https://review.whamcloud.com/37904
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Hongchao Zhang <hongchao@whamcloud.com>
lustre/include/obd_support.h
lustre/lod/lod_dev.c
lustre/lod/lod_internal.h
lustre/lod/lod_lov.c
lustre/lod/lod_object.c
lustre/lod/lod_qos.c
lustre/lod/lproc_lod.c
lustre/mdt/mdt_handler.c
lustre/tests/sanity.sh