Whamcloud - gitweb
LU-9727 lustre: limit OPEN and CLOSE rates in Changelogs 99/28299/31
authorSebastien Buisson <sbuisson@ddn.com>
Mon, 31 Jul 2017 11:50:22 +0000 (20:50 +0900)
committerOleg Drokin <oleg.drokin@intel.com>
Wed, 14 Feb 2018 00:51:52 +0000 (00:51 +0000)
commitb45f8364a307d1b13ebaf5dc59da33bddde92769
tree2149ea422e96c34d7af760bc39cbc03a813e3a2b
parentc722371c18809aaa1de36e5cb61a54de947611b4
LU-9727 lustre: limit OPEN and CLOSE rates in Changelogs

Record OPEN only once in the Changelogs per UID/GID, for a given
open mode, as long as the file is not closed by this UID/GID.
Similarly, only record the last CLOSE per UID/GID.
For instance, it avoids flooding the Changelogs if there is an MPI
job opening the same file thousands of times from different threads.
It reduces the ChangeLog load significantly, without significantly
affecting the audit information.

To achieve this, add a list to struct mdd_object, containing uid/gid
of clients opening files. Record OPEN only if client uid/gid is not
already in list. And record CLOSE only if client uid/gid was just
removed from list.

Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
Change-Id: I0fa08d11f0284d63e531ab48c03a8af6f3928487
Reviewed-on: https://review.whamcloud.com/28299
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Li Xi <lixi@ddn.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/mdd/mdd_internal.h
lustre/mdd/mdd_object.c