Whamcloud - gitweb
LU-14918 osd: don't declare similar ldiskfs writes twice 65/45765/38
authorAlex Zhuravlev <bzzz@whamcloud.com>
Tue, 7 Dec 2021 08:13:54 +0000 (11:13 +0300)
committerOleg Drokin <green@whamcloud.com>
Tue, 14 Feb 2023 06:02:39 +0000 (06:02 +0000)
commit9e6225b2e7385cbb7be0474df01075fafc4966d5
tree3ebf7daef0794080c92dbbcfcd7a0b87a63a6929
parentf16c31ccd91d66caba69d3ceea6a61c1682df59e
LU-14918 osd: don't declare similar ldiskfs writes twice

in some cases (like overstriping) the same operations can be
declared multiple times (new llog records) and this lead to
huge number of credits and performance degradation. we can
avoid this checking for duplicate declarations.
As every declaration would need an allocation, limit the scope
of this checks to transaction likely to be large.

% of "large" transaction in sanity-benchmark, depending on threshold:

  creates < 5 && writes < 5:
  0.58% (mds1) and  2.97% (mds2)

  create < 7 & writes < 7:
  0.58% and 2.4%

  create < 9 & writes  < 9:
  0.6% and 1.85%

  create < 10 & write2 < 10:
  0.0004% and 0.000001%

thus 10 creates or writes is selected as a threshold to enable this
logic.

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: I7c893fe3b95646b4b813b999bc832659dfcf03ad
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/45765
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Li Dongyang <dongyangli@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
lustre/osd-ldiskfs/osd_handler.c
lustre/osd-ldiskfs/osd_internal.h
lustre/osd-ldiskfs/osd_io.c
lustre/osd-ldiskfs/osd_lproc.c
lustre/tests/sanity.sh