<div dir="ltr">Thanks mate, I`ll try it right away. </div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Aug 26, 2013 at 9:11 PM, Dilger, Andreas <span dir="ltr"><<a href="mailto:andreas.dilger@intel.com" target="_blank">andreas.dilger@intel.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On 2013/08/25 6:39 AM, "Nikolay Kvetsinski" <<a href="mailto:nkvecinski@gmail.com">nkvecinski@gmail.com</a>> wrote:<br>

<br>
>Hello, I have a production script that do read operations to a lot of<br>
>small files. I read that one can gain performance boost with small files<br>
>by using a loop device on top of Lustre. So a created 500 GB file striped<br>
>across all of my OSTs(which<br>
> are 8). I formatted the file with ext2 fs, and mounted it on a client.<br>
>Just for the sake of testing a simple bash script finds all files with a<br>
>given file type and cat the first 10 lines in /dev/null.<br>
><br>
><br>
>When I run the script on the Lustre cluster I get :<br>
><br>
><br>
>time sh test.sh<br>
><br>
><br>
>real    1m16.804s<br>
>user    0m2.539s<br>
>sys     0m5.363s<br>
><br>
><br>
><br>
>If I immediately re-run the script the time is :<br>
><br>
><br>
>real    0m12.158s<br>
>user    0m2.218s<br>
>sys     0m5.430s<br>
><br>
><br>
><br>
><br>
>There are 5406 files that meet the filetype criteria.<br>
><br>
><br>
>When I run the script on the mounted loop device I get :<br>
><br>
><br>
>real    2m30.177s<br>
>user    0m2.290s<br>
>sys     0m4.880s<br>
><br>
>And immediate re-run gives me :<br>
><br>
>real    0m7.810s<br>
>user    0m2.187s<br>
>sys     0m5.360s<br>
><br>
><br>
>I`m usig lustre-2.4.0-2.6.32_358.6.2.el6_lustre.g230b174.x86_64_gd3f91c4.<br>
>Also<br>
>set all of "small files" optimizations like, no striping for the dirs<br>
>containing the small files, max_dirty_mb=256, max_rpcs_in_flight=32,<br>
>staahead=8192 and lnet.debug=0.<br>
>Is it normal to get two times slower access times with the mounted loop<br>
>device ??<br>
<br>
</div></div>It depends on how the loop device is doing IO on the underlying objects.<br>
It may<br>
be that ext2 isn't the best filesystem for this.  You could try formatting<br>
it with:<br>
<br>
     mke2fs -t ext4 -O ^journal {device}<br>
<br>
which will enable the flex_bg,extents and other ext4 features but disables<br>
the<br>
journal (which I assume you don't need because you are formatting as ext2<br>
originally).  You should also mount with "-t ext4".<br>
<br>
The flex_bg and mballoc features of ext4 may help improve the IO going to<br>
the<br>
back-end storage and improve the performance when running over loop<br>
devices.<br>
<br>
Cheers, Andreas<br>
<span class="HOEnZb"><font color="#888888">--<br>
Andreas Dilger<br>
<br>
Lustre Software Architect<br>
Intel High Performance Data Division<br>
<br>
<br>
</font></span></blockquote></div><br></div>