<div dir="ltr">Very interesting. Although os.walk may not be widely used in cluster applications, anything that lowers the number of calls to stat() in an spplication is worthwhile for parallel filesystems as stat() is handled by the only non-parallel node, the MDS.<div>
<br></div><div style>Small test on another NFS drive:</div><div style><div>Creating tree at benchtree: depth=4, num_dirs=5, num_files=50</div><div>Priming the system's cache...</div><div>Benchmarking walks on benchtree, repeat 1/3...</div>
<div>Benchmarking walks on benchtree, repeat 2/3...</div><div>Benchmarking walks on benchtree, repeat 3/3...</div><div>os.walk took 0.117s, scandir.walk took 0.041s -- 2.8x as fast</div><div><br></div><div style>I may try it on a Lustre FS if I have some time and if I don't forget about this.</div>
<div style><br></div><div style>Cheers,</div><div style><br></div><div style>Matthieu</div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/5/14 Charles-François Natali <span dir="ltr"><<a href="mailto:cf.natali@gmail.com" target="_blank">cf.natali@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">> I wonder how sshfs compared to nfs.<br>
<br>
</div>(I've modified your benchmark to also test the case where data isn't<br>
in the page cache).<br>
<br>
Local ext3:<br>
cached:<br>
os.walk took 0.096s, scandir.walk took 0.030s -- 3.2x as fast<br>
uncached:<br>
os.walk took 0.320s, scandir.walk took 0.130s -- 2.5x as fast<br>
<br>
NFSv3, 1Gb/s network:<br>
cached:<br>
os.walk took 0.220s, scandir.walk took 0.078s -- 2.8x as fast<br>
uncached:<br>
os.walk took 0.269s, scandir.walk took 0.139s -- 1.9x as fast<br>
<div class="HOEnZb"><div class="h5">_______________________________________________<br>
Python-Dev mailing list<br>
<a href="mailto:Python-Dev@python.org">Python-Dev@python.org</a><br>
<a href="http://mail.python.org/mailman/listinfo/python-dev" target="_blank">http://mail.python.org/mailman/listinfo/python-dev</a><br>
Unsubscribe: <a href="http://mail.python.org/mailman/options/python-dev/matthieu.brucher%40gmail.com" target="_blank">http://mail.python.org/mailman/options/python-dev/matthieu.brucher%40gmail.com</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br>Information System Engineer, Ph.D.<br>Blog: <a href="http://matt.eifelle.com" target="_blank">http://matt.eifelle.com</a><span style="padding-right:16px;width:16px;height:16px"></span><span style="padding-right:16px;width:16px;height:16px"></span><br>
LinkedIn: <a href="http://www.linkedin.com/in/matthieubrucher" target="_blank">http://www.linkedin.com/in/matthieubrucher</a><span style="padding-right:16px;width:16px;height:16px"></span><br>Music band: <a href="http://liliejay.com/" target="_blank">http://liliejay.com/</a><span style="padding-right:16px;width:16px;height:16px"></span><br>
<span style="padding-right:16px;width:16px;height:16px"></span>
</div>