Hello<br><br><div class="gmail_quote">On Mon, Jan 23, 2012 at 2:34 PM, Zheng Da <span dir="ltr">&lt;<a href="mailto:zhengda1936@gmail.com">zhengda1936@gmail.com</a>&gt;</span> wrote:<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="gmail_quote"><div class="im"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>
&gt; I build XFS on the top of ramdisk. So yes, there is a lot of small<br>
&gt; concurrent writes in a second.<br>
&gt; I create a file of 4GB in XFS (the ramdisk has 5GB of space). My test<br>
&gt; program overwrites 4G of data to the file and each time writes a page of<br>
&gt; data randomly to the file. It&#39;s always overwriting, and no appending. The<br>
&gt; offset of each write is always aligned to the page size. There is no<br>
&gt; overlapping between writes.<br>
<br>
</div>Why are you using XFS for this? tmpfs was designed to do this sort<br>
of stuff as efficiently as possible....<br></blockquote></div><div>OK, I can try that. </div></div></blockquote><div>tmpfs doesn&#39;t support direct IO. </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="gmail_quote"><div class="im"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><br>
&gt; So the test case is pretty simple and I think it&#39;s easy to reproduce it.<br>
&gt; It&#39;ll be great if you can try the test case.<br>
<br>
</div>Can you post your test code so I know what I test is exactly what<br>
you are running?<br></blockquote></div><div>I can do that. My test code gets very complicated now. I need to simplify it.</div></div></blockquote><div>Here is the code. It&#39;s still a bit long. I hope it&#39;s OK.</div>
<div>You can run the code like &quot;rand-read file option=direct pages=1048576 threads=8 access=write/read&quot;.</div><div><br></div></div>Thanks,<div>Da</div>