<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 02:36:33 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>Whamcloud Community JIRA</title>
    <link>https://jira.whamcloud.com</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>9.4.14</version>
        <build-number>940014</build-number>
        <build-date>05-12-2023</build-date>
    </build-info>


<item>
            <title>[LU-10602] Add file heat support for Persistent Client Cache</title>
                <link>https://jira.whamcloud.com/browse/LU-10602</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;File heat is a relative attribute of files/objects which reflects the access frequency of the files/objects. The file heat can be controlled by two system-level constants, time period and loss percentage. Time is divided into time periods. The access number during each time period is counted. But the file heat is only recalculated at the end of a time period. And at the end of each time period, a percentage of the former file heat is lost according to the loss percentage.&lt;/p&gt;

&lt;p&gt;File heat mainly designed for cache management. Cache like PCC could use file heat to determine which files to removed from the cache or which files to fetch into cache.&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;</description>
                <environment></environment>
        <key id="50522">LU-10602</key>
            <summary>Add file heat support for Persistent Client Cache</summary>
                <type id="2" iconUrl="https://jira.whamcloud.com/secure/viewavatar?size=xsmall&amp;avatarId=11311&amp;avatarType=issuetype">New Feature</type>
                                            <priority id="4" iconUrl="https://jira.whamcloud.com/images/icons/priorities/minor.svg">Minor</priority>
                        <status id="1" iconUrl="https://jira.whamcloud.com/images/icons/statuses/open.png" description="The issue is open and ready for the assignee to start work on it.">Open</status>
                    <statusCategory id="2" key="new" colorName="default"/>
                                    <resolution id="-1">Unresolved</resolution>
                                        <assignee username="lixi_wc">Li Xi</assignee>
                                    <reporter username="lixi">Li Xi</reporter>
                        <labels>
                            <label>PCC2</label>
                    </labels>
                <created>Mon, 5 Feb 2018 06:21:06 +0000</created>
                <updated>Sat, 30 Jan 2021 00:06:31 +0000</updated>
                                                                                <due></due>
                            <votes>0</votes>
                                    <watches>16</watches>
                                                                            <comments>
                            <comment id="219939" author="gerrit" created="Mon, 5 Feb 2018 06:39:08 +0000"  >&lt;p&gt;Li Xi (lixi@ddn.com) uploaded a new patch: &lt;a href=&quot;https://review.whamcloud.com/31161&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/31161&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-10602&quot; title=&quot;Add file heat support for Persistent Client Cache&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-10602&quot;&gt;LU-10602&lt;/a&gt; llite: add file heat support&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: 98f1e3c57c695bea4b476c81da731383260dcbad&lt;/p&gt;</comment>
                            <comment id="219955" author="pjones" created="Mon, 5 Feb 2018 12:52:18 +0000"  >&lt;p&gt;Thanks Li Xi&lt;/p&gt;</comment>
                            <comment id="231700" author="gerrit" created="Thu, 9 Aug 2018 07:32:07 +0000"  >&lt;p&gt;Yingjin Qian (qian@ddn.com) uploaded a new patch: &lt;a href=&quot;https://review.whamcloud.com/32969&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/32969&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-10602&quot; title=&quot;Add file heat support for Persistent Client Cache&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-10602&quot;&gt;LU-10602&lt;/a&gt; llite: add file heat support&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: pcc&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: 5765bf08fe516ee7fb63207fd374b24904bec71a&lt;/p&gt;</comment>
                            <comment id="231775" author="gerrit" created="Fri, 10 Aug 2018 02:08:56 +0000"  >&lt;p&gt;Yingjin Qian (qian@ddn.com) uploaded a new patch: &lt;a href=&quot;https://review.whamcloud.com/32975&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/32975&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-10602&quot; title=&quot;Add file heat support for Persistent Client Cache&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-10602&quot;&gt;LU-10602&lt;/a&gt; pcc: file heat support for PCC&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: pcc&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: bfa9cd8f9323405615b7511b2bfa979243c2449e&lt;/p&gt;</comment>
                            <comment id="243725" author="gerrit" created="Tue, 12 Mar 2019 07:58:13 +0000"  >&lt;p&gt;Yingjin Qian (qian@ddn.com) uploaded a new patch: &lt;a href=&quot;https://review.whamcloud.com/34399&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/34399&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-10602&quot; title=&quot;Add file heat support for Persistent Client Cache&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-10602&quot;&gt;LU-10602&lt;/a&gt; llite: add file heat support&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: 9c9e7bf7148fb6322a1ad6451d1c0dca4f3776d1&lt;/p&gt;</comment>
                            <comment id="244482" author="lixi_wc" created="Fri, 22 Mar 2019 02:51:24 +0000"  >&lt;p&gt;It would be useful to implement TopN list support for file heat.&lt;/p&gt;

&lt;p&gt;After an hour discussion with Yingjin and Shilong about the possible designs and their cons and pros, we think the following design might work:&lt;/p&gt;

&lt;p&gt;1) In order to avoid any performance impact, the sorting of the TopN will not add anything in the I/O process.&lt;/p&gt;

&lt;p&gt;2) TopN sorting will be implemented using binary heap based on cfs_binheap.&lt;/p&gt;

&lt;p&gt;3) A background thread scans &quot;s_inodes&quot; list of &quot;struct super_block&quot; and adds each inode into the binary heap. Examples of this are wait_sb_inodes(), add_dquot_ref(), drop_pagecache_sb() etc.&lt;/p&gt;

&lt;p&gt;4) The scanning frequency could be a configurable parameter which depends on total inode numbers, heat decay time, resolution ratio (the rate that user-space tool dumps the list), etc.&lt;/p&gt;

&lt;p&gt;5) Between handling of each inode, functions like cond_resched() should be called to avoid too high CPU usage or affecting normal I/O or file system access.&lt;/p&gt;

&lt;p&gt;6) The binary heap is reverse order, meaning the top node is the file with least heat on the top.&lt;/p&gt;

&lt;p&gt;7) Whenever an inode is adding to the binary heap, a new structure (e.g. &quot;struct inode_heat_node&quot;) will be allocated for the inode with FIDs, inums and other fields properly set.&lt;/p&gt;

&lt;p&gt;8) If the size of binary heap becomes larger than N (i.e. size == N+1) after inserting, an inodes will be removed from the top of the binary heap.&lt;/p&gt;

&lt;p&gt;9) &lt;b&gt;optimization:&lt;/b&gt; cfs_binheap_copy() will be implemented to copy the binary heap. When a user-space process starts to dump the TopN list, the binary heap will be copied so as to make the dumping quicker. cfs_binheap_copy() essentially copies element arrays, thus should be fast.&lt;/p&gt;

&lt;p&gt;10) When user-space tool starts to dump the TopN list, the dumping binary heap shall be removed from the  top to generate the TopN list with ascending order. The user-space tool shall change the list to descending order if needed.&lt;/p&gt;

&lt;p&gt;11) Before dumping the TopN list, the administrator should configure which type of file heats (read, write, read sample or write sample) the sorting should be based on. N should also be a configurable parameter. These things could be configured through /sys or /proc interface. If memory is not a limitation, we could maitain four topN list at the same time for each type of file heats.&lt;/p&gt;

&lt;p&gt;12) User-space tool shall read the TopN list and show in a proper way flushing the result after each time period (like what command top  does).&lt;/p&gt;</comment>
                            <comment id="244483" author="lixi_wc" created="Fri, 22 Mar 2019 02:56:19 +0000"  >&lt;p&gt;Maybe cfs_binheap_() supports removing from the tail (not the top). Then the binary heap could be implemented as descending order, i.e. the top node has the highest heap.&lt;/p&gt;</comment>
                            <comment id="244496" author="qian_wc" created="Fri, 22 Mar 2019 06:52:35 +0000"  >&lt;p&gt;The command to show the TopN heat can be defined as follow:&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
# lfs heat_top [-p $sample_period] [-i $heat_dimension] [-N $topN]&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Where&lt;br/&gt;
-&lt;em&gt;$sample_period&lt;/em&gt; is the period in second to show the topN heat;&lt;br/&gt;
-&lt;em&gt;$heat_dimension&lt;/em&gt; is the key value to sort the file heat. Currently Lustre file heat has 4 dimension indicators to measure the file heat: readsample, writesample, readbyte, writebyte. The $heat_dimension could be &quot;readsample&quot;, &quot;writesample&quot;, &quot;readbyte&quot;, &quot;writebyte&quot;, or even their combination such &quot;iosample&quot; (it means &quot;readsample&quot; heat value + &quot;writesample&quot; heat value) or &quot;iobyte&quot; (it means sorting according to the key &quot;readbyte&quot; heat value + &quot;writesample&quot; heat value).&lt;br/&gt;
-&lt;em&gt;$topN&lt;/em&gt; is the topn value.&lt;/p&gt;

&lt;p&gt;We also should implement a llapi interface for users to get the TopN file heat value via IOCTL, it could be defined as:&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
struct lu_heat_item {
 struct lu_fid lhi_fid;
 struct lu_heat lhi_heat;
};
struct lu_topn_heats {
 __u32 lth_topn;
 struct lu_heat_item lth_item[0];
};&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;&#160;&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
&lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt; llapi_heat_topn_get(&lt;span class=&quot;code-keyword&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;code-object&quot;&gt;char&lt;/span&gt; *mntpt, &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt; topn, &lt;span class=&quot;code-object&quot;&gt;char&lt;/span&gt; *sortkey, sturct lu_topn_heats *heats);&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Each time, an adminstrator wants to get the topN file heat information, it can call the llapi above.&lt;br/&gt;
As there are so many sorting factors (we have illustrate 6 sort keys above) and the TopN is also a variable,to simply the implementation, IMHO, we would better to avoid to use a background kernel thread, just need to scan the &quot;s_inodes&quot; list of &quot;superblock&quot; and sort the file heat when the user calls the llapi via IOCTL above in the first version implementation.&lt;/p&gt;</comment>
                            <comment id="244498" author="lixi_wc" created="Fri, 22 Mar 2019 07:54:35 +0000"  >&lt;p&gt;&amp;gt; IMHO, we would better to avoid to use a background kernel thread, just need to scan the &quot;s_inodes&quot; list of &quot;superblock&quot; and sort the file heat when the user calls the llapi via IOCTL above in the first version implementation.&lt;/p&gt;

&lt;p&gt;Sounds reasonable, Yingjin. This would make the implementation simpler.&lt;/p&gt;</comment>
                            <comment id="244875" author="gerrit" created="Fri, 29 Mar 2019 07:49:26 +0000"  >&lt;p&gt;Yingjin Qian (qian@ddn.com) uploaded a new patch: &lt;a href=&quot;https://review.whamcloud.com/34540&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/34540&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-10602&quot; title=&quot;Add file heat support for Persistent Client Cache&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-10602&quot;&gt;LU-10602&lt;/a&gt; llite: Add support for file heat TopN listing&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: 219ca7222ae12ebf7a1e0bf48adbf199fe041b82&lt;/p&gt;</comment>
                            <comment id="245007" author="gerrit" created="Mon, 1 Apr 2019 07:24:20 +0000"  >&lt;p&gt;Oleg Drokin (green@whamcloud.com) merged in patch &lt;a href=&quot;https://review.whamcloud.com/34399/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/34399/&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-10602&quot; title=&quot;Add file heat support for Persistent Client Cache&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-10602&quot;&gt;LU-10602&lt;/a&gt; llite: add file heat support&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: &lt;br/&gt;
Commit: ae723cf8161f7af15fb7c2541fa7d4131a816af9&lt;/p&gt;</comment>
                            <comment id="246346" author="gerrit" created="Thu, 25 Apr 2019 13:29:07 +0000"  >&lt;p&gt;Andreas Dilger (adilger@whamcloud.com) uploaded a new patch: &lt;a href=&quot;https://review.whamcloud.com/34757&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/34757&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-10602&quot; title=&quot;Add file heat support for Persistent Client Cache&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-10602&quot;&gt;LU-10602&lt;/a&gt; utils: fix file heat support&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: 6a9db0937c5c4ae526d250aff7d11c83fb22bfd0&lt;/p&gt;</comment>
                            <comment id="246835" author="gerrit" created="Wed, 8 May 2019 06:05:23 +0000"  >&lt;p&gt;Oleg Drokin (green@whamcloud.com) merged in patch &lt;a href=&quot;https://review.whamcloud.com/34757/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/34757/&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-10602&quot; title=&quot;Add file heat support for Persistent Client Cache&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-10602&quot;&gt;LU-10602&lt;/a&gt; utils: fix file heat support&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: &lt;br/&gt;
Commit: ac1f97a881019b78ce3289885461259d280562b3&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10120">
                    <name>Blocker</name>
                                            <outwardlinks description="is blocking">
                                                        </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10011">
                    <name>Related</name>
                                            <outwardlinks description="is related to ">
                                        <issuelink>
            <issuekey id="50294">LU-10530</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="48631">LU-10092</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="50196">LU-10499</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is related to">
                                                        </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                <customfield id="customfield_10890" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_10390" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hzzs4v:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10090" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>9223372036854775807</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                </customfields>
    </item>
</channel>
</rss>