On Fri, Jun 16, 2006 at 02:38:19PM +0300, Jan Wagner wrote:
> > Or more simply (ie. without create + set-realtime-explicitly)...
> > # mkdir /mnt/test/realtime
> > # xfs_io -c 'chattr +t' -c 'lsattr -v' /mnt/test/realtime
> > [rt-inherit] /mnt/test/realtime
> Thanks for the tip also, that would really be the easiest way - there'd be
> several other code that I would have to edit otherwise.
> But for some reason at least the above xfs_io command does not work, I get
> # mkdir /i1/inherit
> # xfs_io -c 'chattr +t' -c 'lsattr -v' /i1/inherit
> /i1/inherit: Is a directory
> "Is a directory", any ideas?
Oh, your xfs_io is a bit dated, Tim improved the behaviour in this
area awhile back. You will need the -r command line option with that
> Do I need to get XFS source from elsewhere than the one included in
> debian kernel 2.6.16?
Nope, thats fine.
> Oh and another question, is it possible that realtime reads are much
> slower than writes? Or am I again making a mistake somewhere?
Hmm, thats odd.
> # xfs_io -fR /i1/testfile -c 'pwrite -b 4m 0 2g'
> wrote 2147483648/2147483648 bytes at offset 0
> 2.000 GiB, 512 ops; 00:00:05.645958 (362.737 MiB/sec and 90.6843 ops/sec)
> write 360MiB/s
> # xfs_io -fR /i1/testfile -c 'pread -b 4m 2g'
> read 2147483648/2147483648 bytes at offset 0
> 2.000 GiB, 512 ops; 00:00:39.156626 (52.303 MiB/sec and 13.0757 ops/sec)
> # xfs_io -fR /i1/testfile -c 'pread 4m 2g'
> read 2147483648/2147483648 bytes at offset 4194304
> 2.000 GiB, 524288 ops; 00:00:27.229922 (75.211 MiB/sec and 19254.1132
These last two are not what you want, I think, esp. the very last one;
the -b option specific the buffer size. In the last case you're using
1k instead of 4m buffers (hence the large number of ops). But the 2nd
last case doesn't suffer that - it doesnt give an offset, but looks like
xfs_io is defaulting to zero there.
Since you're doing buffered reads/writes, your read numbers there may be
being influenced by writeout. Try using the pwrite command with -W and/
or unmount+mount between benchmark runs.
When I run it locally, reading from disk shows slightly better results
than writing (single file, single process, single disk).