Whamcloud - gitweb
LU-10948 llite: Introduce inode open heat counter
authorOleg Drokin <green@whamcloud.com>
Tue, 13 Apr 2021 07:46:41 +0000 (03:46 -0400)
committerAndreas Dilger <adilger@whamcloud.com>
Wed, 21 Jul 2021 06:02:24 +0000 (06:02 +0000)
commit5c6bd66dc5b0417cb1db1cb1f71f47d16c91510a
tree04bcc9f27533f23b8f898ee833293e9744abc96f
parentee5d5674a61d31675a8314e635214694671fdc75
LU-10948 llite: Introduce inode open heat counter

Initial framework to support detection of naive apps that
assume open-closes are "free" and proceed to open/close
same files between minute operations.

We will track number of file opens per inode and last time inode
was closed.

Initially we'll expose these controls:
llite/opencache_threshold_count - enables functionality and controls after
                                  how many opens open lock is requested
llite/opencache_threshold_ms    - if any reopen happens within this time (in
                                  ms), open would trigger open lock request
llite/opencache_max_ms          - If last close was longer than this many ms
                                  ago - start counting opens from zero again

Once enough useful data is collected we can look into adding a heatmap
or another similar mechanism to better manage it and enable it
by default with sensible settings.

Currently it's disabled by default

Lustre-change: https://review.whamcloud.com/32158/
Lustre-commit: 41d99c4902836b7265db946dfa49cf99381f0db4

Change-Id: I1aa5455b458840acad651f651c883a7a7a67ab4c
Signed-off-by: Lai Siyao <lai.siyao@whamcloud.com>
Signed-off-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Yingjin Qian <qian@ddn.com>
Reviewed-on: https://review.whamcloud.com/44301
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
lustre/llite/file.c
lustre/llite/llite_internal.h
lustre/llite/llite_lib.c
lustre/llite/lproc_llite.c
lustre/tests/sanity-hsm.sh
lustre/tests/sanity-selinux.sh
lustre/tests/sanity.sh
lustre/tests/test-framework.sh