ZFS uses caching heavily as well; much more so, in fact, than UFS. Copy-on-write and direct i/o are not related. As you say, data gets written first, then the metadata which points to it, but this isn't anything like direct I/O. In particular, direct I/O avoids caching the data, instead transferring it directly to/from user buffers, while ZFS-style copy-on-write caches all data. ZFS does not have direct I/O at all right now.
One key difference between UFS & ZFS is that ZFS flushes the drive's write cache at key points. (It does this rather than using ordered commands, even on SCSI disks, which to me is a little disappointing.) This guarantees that the data is on-disk before the associated metadata. UFS relies on keeping the write cache disabled to ensure that its journal is written to disk before its metadata, again with the goal of keeping the file system consistent at all times. I agree with you on tuning. It's clearly desirable that the "out-of-box" settings for a file system work well for "general purpose" loads; but there are almost always applications which require a different strategy. This is much of why UFS/QFS/VxFS added direct i/o, and it's why VxFS (which focuses heavily on database) added quick i/o. This message posted from opensolaris.org _______________________________________________ zfs-discuss mailing list [email protected] http://mail.opensolaris.org/mailman/listinfo/zfs-discuss
