<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">
Anna,
<div class="">for monitoring server storage access, the client-side file heat is not actually very useful, because (a) it is spread across all of the clients, and (b) it shows the client-side access patterns (which may be largely from cache) and not the actual
 server storage access which is what is important for tiering decisions.</div>
<div class=""><br class="">
</div>
<div class="">Consider if a client reads a file once from the storage, and then accesses it 1000x from cache, the file may be considered &quot;hot&quot; by the client but it doesn't really matter what kind of storage the file is on since the storage only sees a single
 read.</div>
<div class=""><br class="">
</div>
<div class="">Instead of the client-side file heat there is a different mechanism, the OST (lustre/utils/ofd_access_log_reader.c, ALR) that is a lightweight mechanism to aggregate all storage access into a producer/consumer circular log that is consumed by
 a userspace process. It is up to the userspace process to aggregate these log records across all of the OSTs to make decisions about which files are &quot;hot&quot; and which are &quot;cold&quot;. &nbsp;The ALR records are described in&nbsp;lustre/include/uapi/linux/lustre/lustre_access_log.h:</div>
<div class=""><br class="">
</div>
struct&nbsp;ofd_access_entry_v1 {<br class="">
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;struct&nbsp;lu_fid&nbsp;&nbsp;&nbsp;oae_parent_fid;&nbsp;/* 16 */<br class="">
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;__u64&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;oae_begin;&nbsp;/* 24 */<br class="">
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;__u64&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;oae_end;&nbsp;/* 32 */<br class="">
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;__u64&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;oae_time;&nbsp;/* 40 */<br class="">
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;__u32&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;oae_size;&nbsp;/* 44 */<br class="">
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;__u32&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;oae_segment_count;&nbsp;/* 48 */<br class="">
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;__u32&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;oae_flags;&nbsp;/* 52 enum ofd_access_flags */<br class="">
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;__u32&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;oae_reserved1;&nbsp;/* 56 */<br class="">
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;__u32&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;oae_reserved2;&nbsp;/* 60 */<br class="">
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;__u32&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;oae_reserved3;&nbsp;/* 64 */<br class="">
<div class="">};</div>
<div class=""><br class="">
</div>
<div class="">The records contain the MDT FID (to allow aggregation of IOs across multiple describe if it &nbsp;is a read or write, and the start/end of the extent read/written so that the consumer can decide if the IOs are well-formed for the storage (e.g. large
 or sequential reads/writes on an HDD are OK vs. small/random reads/writes on an HDD are not OK). &nbsp;The ALR queue is transient, so it is up to the consumer to make any decisions about the current IO patterns on files</div>
<div class=""><br class="">
</div>
<div class="">Cheers, Andreas</div>
<div class="">
<div><br class="">
<blockquote type="cite" class="">
<div class="">On Feb 22, 2023, at 14:16, Anna Fuchs &lt;<a href="mailto:anna.fuchs@uni-hamburg.de" class="">anna.fuchs@uni-hamburg.de</a>&gt; wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div class="">Thank you.<br class="">
<br class="">
Is there any documentation for the values?<br class="">
Client-side means only statistics for the file remaining in the client cache? Not lifetime statistics?<br class="">
Are there any plans to work further on this feature?<br class="">
<br class="">
I think of several use cases when knowing these stats.<br class="">
Cold data could be moved to archive like slow tape without relying on access time.<br class="">
Hot blocks could be replicated or moved to faster caches and lot more optimizations.<br class="">
<br class="">
Best regards<br class="">
Anna<br class="">
<font size="4" class=""><font face="monospace" class=""><br class="">
<br class="">
</font></font><br class="">
<div class="moz-cite-prefix">Am 18.02.2023 um 21:57 schrieb Andreas Dilger:<br class="">
</div>
<blockquote type="cite" cite="mid:F62444B8-0995-4FD6-A4EE-4BDFEEB00442@whamcloud.com" class="">
<pre class="moz-quote-pre" wrap="">Anna, there was a client-side file heat mechanism added a few years ago, but I don't know if it is fully functional today.

lctl get_param llite.*.*heat*
llite.myth-ffff979380fc1800.file_heat=1
llite.myth-ffff979380fc1800.heat_decay_percentage=80
llite.myth-ffff979380fc1800.heat_period_second=60

And then &quot;lfs heat_get &lt;file&gt;&quot; to dump the file heat,  it there haven't been any good tools developed yet to list top heat files. 

Cheers, Andreas

</pre>
<blockquote type="cite" class="">
<pre class="moz-quote-pre" wrap="">On Feb 7, 2023, at 08:56, Anna Fuchs via lustre-discuss <a class="moz-txt-link-rfc2396E" href="mailto:lustre-discuss@lists.lustre.org">&lt;lustre-discuss@lists.lustre.org&gt;</a> wrote:

\ufeffHello,

is there a way to see how many times a file has been accessed ever (like a heat map)?

Thanks
Anna

-- 
Anna Fuchs
Universität Hamburg
<a class="moz-txt-link-freetext" href="https://wr.informatik.uni-hamburg.de/">https://wr.informatik.uni-hamburg.de</a>

<a class="moz-txt-link-abbreviated" href="mailto:anna.fuchs@informatik.uni-hamburg.de">anna.fuchs@informatik.uni-hamburg.de</a>
<a class="moz-txt-link-freetext" href="https://wr.informatik.uni-hamburg.de/people/anna_fuchs">https://wr.informatik.uni-hamburg.de/people/anna_fuchs</a>



_______________________________________________
lustre-discuss mailing list
<a class="moz-txt-link-abbreviated" href="mailto:lustre-discuss@lists.lustre.org">lustre-discuss@lists.lustre.org</a>
<a class="moz-txt-link-freetext" href="http://lists.lustre.org/listinfo.cgi/lustre-discuss-lustre.org">http://lists.lustre.org/listinfo.cgi/lustre-discuss-lustre.org</a>
</pre>
</blockquote>
</blockquote>
<br class="">
<pre class="moz-signature" cols="72">-- 
Anna Fuchs
Universität Hamburg
<a class="moz-txt-link-freetext" href="https://wr.informatik.uni-hamburg.de/">https://wr.informatik.uni-hamburg.de</a>

<a class="moz-txt-link-abbreviated" href="mailto:anna.fuchs@informatik.uni-hamburg.de">anna.fuchs@informatik.uni-hamburg.de</a>
<a class="moz-txt-link-freetext" href="https://wr.informatik.uni-hamburg.de/people/anna_fuchs">https://wr.informatik.uni-hamburg.de/people/anna_fuchs</a></pre>
</div>
</div>
</blockquote>
</div>
<br class="">
<div class="">
<div dir="auto" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">
<div dir="auto" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">
<div dir="auto" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">
<div dir="auto" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">
<div dir="auto" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">
<div dir="auto" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">
<div>Cheers, Andreas</div>
<div>--</div>
<div>Andreas Dilger</div>
<div>Lustre&nbsp;Principal Architect</div>
<div>Whamcloud</div>
<div><br class="">
</div>
<div><br class="">
</div>
<div><br class="">
</div>
</div>
</div>
</div>
</div>
</div>
<br class="Apple-interchange-newline">
</div>
<br class="Apple-interchange-newline">
<br class="Apple-interchange-newline">
</div>
<br class="">
</div>
</body>
</html>