[LU-12584] File heat dump on a client Created: 24/Jul/19  Updated: 30/Jan/21

Status: Open
Project: Lustre
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: New Feature Priority: Minor
Reporter: Qian Yingjin Assignee: Qian Yingjin
Resolution: Unresolved Votes: 0
Labels: None

Issue Links:
Related
Rank (Obsolete): 9223372036854775807

 Description   

Adding filter policy inside kernel for heat dump on a client:

  • Inside kernel, a client maintains a list to track inodes' file heat information for a Lustre filesystem instance.
  • Only a small part of inodes will be putted into this list.
  • When opening a file, add the corresponding inode to the list according to some predefined file heat filter policy (uid/gid/projid/fname or jobid); The filter policy can be defined by users.
  • Remove an inode from the list when it is finally released.
  • An administrator can dump the file heat information for inodes in the list to the user space.
  • Also all tracked inodes in the list can be cleared up by an administrator.

 

First version only implements the base functionalities:

  • Dump the file heat information to user space.
  • Clear the file heat tracking list.

 

The file heat filter policy will add when the patch https://review.whamcloud.com/#/c/33126/ has been merged as it will separate some common command and rule parse functions shared with NRS TBF and PCC codes.

 

Some lfs lctl commands are also added to support the new file heat dump feature:

enable file heat feature on a client
$ lctl set_param llite.*.heat=eanble
disable file heat feature on a client
$lctl set_param llite.*.heat=disable
config file heat parameters
$lctl set_param llite.*.heat="conf decay_pct=70 period_second=90"
list file heat information:
$ lctl get_param -n llite.*heat
dump file heat
$ lfs heat_dump [--num|-N <Num>] [--start-fid|-s <FID>] <mntpt>
clear the file heat tracking list on a client
$ lctl set_param llite.*.heat=clear

 

Possible performance impact on the file creation/open: 

we add a global spin lock when add/remove tracked inodes into/from the list, it may affect the file creation performance.

 

 



 Comments   
Comment by Gerrit Updater [ 24/Jul/19 ]

Yingjin Qian (qian@ddn.com) uploaded a new patch: https://review.whamcloud.com/35602
Subject: LU-12584 llite: File heat dump feature on a client
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 20a5a7d0b0d5ce11ad2ab58b194a18af3efa9d1f

Generated at Sat Feb 10 02:53:53 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.