Took a while to get back to XFS testing...
On Thu, 8 Jun 2006, Nathan Scott wrote:
> On Wed, Jun 07, 2006 at 02:05:57PM +0300, Jan Wagner wrote:
> > On Tue, 6 Jun 2006, Nathan Scott wrote:
> > Other question, is the below really the correct way to enable realtime for
> > a new file?
>
> Its one way. Also try:
>
> # xfs_io -fR /mnt/test/realtime -c 'pwrite -b 1m 0 100m'
> wrote 104857600/104857600 bytes at offset 0
> 100 MiB, 100 ops; 0:00:01.00 (95.473 MiB/sec and 95.4726 ops/sec)
> # xfs_io -f /mnt/test/regular -c 'pwrite -b 1m 0 100m'
> wrote 104857600/104857600 bytes at offset 0
> 100 MiB, 100 ops; 0:00:01.00 (67.574 MiB/sec and 67.5735 ops/sec)
Thank's for the info!
It seems to work, with a small (40MiB/sec) gain:
# mkfs.xfs -f -l logdev=/dev/hda6,size=10000b /dev/md0
# mount -t xfs -o logdev=/dev/hda6 /dev/md0 /i1
then test
# xfs_io -f /i1/testfile -c 'pwrite -b 4m 0 6g'
wrote 6442450944/6442450944 bytes at offset 0
6.000 GiB, 1536 ops; 00:00:25.897914 (237.239 MiB/sec and 59.3098 ops/sec)
vs realtime
# umount /i1
# mkfs.xfs -f -r rtdev=/dev/md0 /dev/hda6
# mount -t xfs -o rtdev=/dev/md0 /dev/hda6 /i1
with test
# xfs_io -fR /i1/testfile -c 'pwrite -b 4m 0 6g'
wrote 6442450944/6442450944 bytes at offset 0
6.000 GiB, 1536 ops; 00:00:22.154212 (277.329 MiB/sec and 69.3322 ops/sec)
So there indeed is a small gain, and apparently realtime works.
Nice! :-)
> 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
I already tried playing around inf xfs_io command line, and checked the
other xfs_... helper tools, but there and in their man pages there are
only references to file editing, not directory edit.
"Is a directory", any ideas?
Do I need to get XFS source from elsewhere than the one included in
debian kernel 2.6.16?
The XFS choices in the kernel config are
CONFIG_XFS_FS=m
CONFIG_XFS_EXPORT=y
# CONFIG_XFS_QUOTA is not set
# CONFIG_XFS_SECURITY is not set
# CONFIG_XFS_POSIX_ACL is not set
CONFIG_XFS_RT=y
> > assert( (fid = open(pn, O_WRONLY|O_CREAT|O_DIRECT|O_SYNC|O_LARGEFILE)) !=
> > -1 );
>
> Thats a shocking use of assert. :)
Local coding style here, unfortunately ;-))
> > fsxinfo.fsx_xflags = XFS_XFLAG_REALTIME;
>
> fsxinfo.fsx_xflags |= ... (to not blow away any other flags you
> might have had set on that file).
That was one problem, now it seems to work with the test code. Pilot
error, yes :)
Oh and another question, is it possible that realtime reads are much
slower than writes? Or am I again making a mistake somewhere?
# 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
ops/sec)
read max 75MiB/s
thanks again,
- Jan
|