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)
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
# xfs_io -f /mnt/test/realtime/foo -c 'pwrite -b 1m 0 100m'
wrote 104857600/104857600 bytes at offset 0
100 MiB, 100 ops; 0:00:01.00 (93.357 MiB/sec and 93.3569 ops/sec)
(above is all buffered I/O btw, not direct - use -d flag for that).
> /* O_DIRECT for "realtime" */
You don't need O_DIRECT for realtime these days.
> assert( (fid = open(pn, O_WRONLY|O_CREAT|O_DIRECT|O_SYNC|O_LARGEFILE)) != -1
> );
Thats a shocking use of assert. :)
> fsxinfo.fsx_xflags = XFS_XFLAG_REALTIME;
fsxinfo.fsx_xflags |= ... (to not blow away any other flags you
might have had set on that file).
> I'm getting only about 500mbits/s write speed into the file (continuously
> writing 1024 byte or much larger chunks) with the above code on XFS with
> the rtdev on a RAID0 /dev/md0 and "actual" XFS on /dev/hda6. With XFS
> directly on /dev/md0 and no realtime section but logdev=/dev/hda6,
> throughput is a nice ~2.5gbits/s.
Sounds like youre comparing buffered to direct IO? (and for a very
small amount of data that goes straight to the page cache for your
buffered writes, and you're not accounting flush times). But thats
just a guess, maybe your md0 really does do 2.5gbits/s? Doubt it.
> Hence not sure if the above code is correct? (but maybe rt support in the
> linux 2.6.16 kernel really is /this/ "experimental" ;-)...
Looks more like pilot error to me. :)
cheers.
--
Nathan
|