<div dir="ltr"><div dir="ltr">On Thu, Aug 5, 2021 at 3:23 PM Andreas Dilger &lt;<a href="mailto:adilger@whamcloud.com">adilger@whamcloud.com</a>&gt; wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">



<div style="overflow-wrap: break-word;">
On Aug 5, 2021, at 13:29, Nathan Dauchy wrote:<br>
<div>
<blockquote type="cite"><div><div dir="ltr"><div>Andreas, thanks as always for your insight.  Comments inline...</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Thu, Aug 5, 2021 at 10:48 AM Andreas Dilger &lt;<a href="mailto:adilger@whamcloud.com" target="_blank">adilger@whamcloud.com</a>&gt; wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div>On Aug 5, 2021, at 09:28, Nathan Dauchy via lustre-discuss &lt;<a href="mailto:lustre-discuss@lists.lustre.org" target="_blank">lustre-discuss@lists.lustre.org</a>&gt; wrote:<br>
<div>
<blockquote type="cite">
<div>
<div dir="ltr">
<div>Question:  Is it possible that a flash journal device on an ext4 filesystem can reach a point where there are not enough clean blocks to write to, and they can suffer from very degraded write performance?<br></div></div></div></blockquote></div></div></blockquote></div></div></div></blockquote></div></div></blockquote><div>... </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="overflow-wrap: break-word;"><div><blockquote type="cite"><div><div dir="ltr"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div><blockquote type="cite"><div><div dir="ltr"><div>
</div>
</div>
</div>
</blockquote>
</div></div></blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div><blockquote type="cite"><div><div dir="ltr"><div>Another related question would be how to benchmark the journal device on it&#39;s own, particularly write performance, without losing data on an existing file system; similar to the very useful obdfilter-survey tool, but at a lower level.  But I am
 primarily looking to understand the nuances of flash devices and ldiskfs external journals a bit better.</div>
</div>
</div>
</blockquote>
</div>
<div>While the external journal device has an ext4 superblock header for identification (UUID/label), and a feature flag that prevents it from being mounted/used directly, it is not really an ext4 filesystem, just a flat &quot;file&quot;.  You&#39;d need to remove
 it from the main ext4/ldiskfs filesystem, reformat it as ext4 and mount locally, and then run benchmarks (e.g. &quot;dd&quot; would best match the JBD2 workload, or fio if you want random IOPS) against it.  You could do this before/after trim (could use fstrim at this
 point) to see if it affects the performance or not.</div>
</div>
</blockquote>
<div><br>
</div>
<div>OK, thanks for confirming that there is no magic ext4 journal benchmarking tool.  I&#39;ll stop searching.  ;-)</div>
</div>
</div>
</div>
</blockquote>
</div><div>Note that there *are* some journal commit statistics - /proc/fs/jbd2/&lt;dev&gt;/info that you might be able to compare between devices.  Probably the most interesting is &quot;average transaction commit time&quot;, which is how long it takes to write the blocks to the
 journal device after the transaction starts to commit.</div>
<div><div dir="auto" style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none"><div dir="auto" style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none"><div dir="auto" style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none"><div dir="auto" style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none"><div dir="auto" style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none"><div dir="auto" style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none"><div><br></div></div></div></div></div></div></div></div></div></blockquote><div><br></div><div>Oh, that is interesting!</div><div><br></div><div>The &quot;average transaction commit time&quot; seems to fluctuate, possibly with load, and doesn&#39;t have an obvious correlation to the slower OSTs.  But perhaps I&#39;ll look at it again when running a clean benchmark during a future dedicated time.</div><div><br></div><div>I _did_ find a stark difference in other metrics though:</div><div><br></div><div># pdsh -g oss &quot;grep &#39;handles per&#39; /proc/fs/jbd2/md*/info&quot; | sort<br>lfs4n04:   17 handles per transaction<br>lfs4n05:   18 handles per transaction<br>lfs4n06:   18 handles per transaction<br>lfs4n07:   18 handles per transaction<br>lfs4n08:   17 handles per transaction<br>lfs4n09:   17 handles per transaction<br>lfs4n10:   18 handles per transaction<br>lfs4n11:   18 handles per transaction<br>lfs4n12:   18 handles per transaction<br>lfs4n13:   17 handles per transaction<br>lfs4n16:   192 handles per transaction<br>lfs4n17:   178 handles per transaction<br>lfs4n18:   198 handles per transaction<br>lfs4n19:   192 handles per transaction<br># pdsh -g oss &quot;grep &#39;logged blocks per&#39; /proc/fs/jbd2/md*/info&quot; | sort<br>lfs4n04:   24 logged blocks per transaction<br>lfs4n05:   24 logged blocks per transaction<br>lfs4n06:   25 logged blocks per transaction<br>lfs4n07:   25 logged blocks per transaction<br>lfs4n08:   24 logged blocks per transaction<br>lfs4n09:   24 logged blocks per transaction<br>lfs4n10:   25 logged blocks per transaction<br>lfs4n11:   24 logged blocks per transaction<br>lfs4n12:   24 logged blocks per transaction<br>lfs4n13:   24 logged blocks per transaction<br>lfs4n16:   103 logged blocks per transaction<br>lfs4n17:   98 logged blocks per transaction<br>lfs4n18:   106 logged blocks per transaction<br>lfs4n19:   103 logged blocks per transaction<br></div><div><br></div><div>The last 4 nodes are the expansion OSTs which are performing better.  What does that difference indicate?</div><div><br></div><div>Thanks again,</div><div>Nathan</div><div><br></div></div></div>