concurrent direct IO write in xfs

Zheng Da zhengda1936 at gmail.com
Mon Jan 23 14:51:43 CST 2012


Hello

On Mon, Jan 23, 2012 at 2:34 PM, Zheng Da <zhengda1936 at gmail.com> wrote:
>
> > I build XFS on the top of ramdisk. So yes, there is a lot of small
>> > concurrent writes in a second.
>> > I create a file of 4GB in XFS (the ramdisk has 5GB of space). My test
>> > program overwrites 4G of data to the file and each time writes a page of
>> > data randomly to the file. It's always overwriting, and no appending.
>> The
>> > offset of each write is always aligned to the page size. There is no
>> > overlapping between writes.
>>
>> Why are you using XFS for this? tmpfs was designed to do this sort
>> of stuff as efficiently as possible....
>>
> OK, I can try that.
>
tmpfs doesn't support direct IO.

>
>> > So the test case is pretty simple and I think it's easy to reproduce it.
>> > It'll be great if you can try the test case.
>>
>> Can you post your test code so I know what I test is exactly what
>> you are running?
>>
> I can do that. My test code gets very complicated now. I need to simplify
> it.
>
Here is the code. It's still a bit long. I hope it's OK.
You can run the code like "rand-read file option=direct pages=1048576
threads=8 access=write/read".

Thanks,
Da
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://oss.sgi.com/pipermail/xfs/attachments/20120123/18a4d1e2/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: simple-rand-read.cc
Type: text/x-c++src
Size: 9603 bytes
Desc: not available
URL: <http://oss.sgi.com/pipermail/xfs/attachments/20120123/18a4d1e2/attachment.cc>


More information about the xfs mailing list