On Mon, Feb 7, 2011 at 1:51 PM, Brandon High <bh...@freaks.com> wrote:
> On Mon, Feb 7, 2011 at 10:29 AM, Yi Zhang <yizhan...@gmail.com> wrote:
>> I already set primarycache to metadata, and I'm not concerned about
>> caching reads, but caching writes. It appears writes are indeed cached
>> judging from the time of 2.a) compared to UFS+directio. More
>> specifically, 80MB/2s=40MB/s (UFS+directio) looks realistic while
>> 80MB/0.11s=800MB/s (ZFS+primarycache=metadata) doesn't.
>
> You're trying to force a solution that isn't relevant for the
> situation. ZFS is not UFS, and solutions that are required for UFS to
> work correctly are not needed with ZFS.
>
> Yes, writes are cached, but all the POSIX requirements for synchronous
> IO are met by the ZIL. As long as your storage devices, be they SAN,
> DAS or somewhere in between respect cache flushes, you're fine. If you
> need more performance, use a slog device that respects cache flushes.
> You don't need to worry about whether writes are being cached, because
> any data that is written synchronously will be committed to stable
> storage before the write returns.
>
> -B
>
> --
> Brandon High : bh...@freaks.com
>
Maybe I didn't make my intention clear. UFS with directio is
reasonably close to a raw disk from my application's perspective: when
the app writes to a file location, no buffering happens. My goal is to
find a way to duplicate this on ZFS.

Setting primarycache didn't eliminate the buffering, using O_DSYNC
(whose side effects include elimination of buffering) made it
ridiculously slow: none of the things I tried eliminated buffering,
and just buffering, on ZFS.

>From the discussion so far my feeling is that ZFS is too different
from UFS that there's simply no way to achieve this goal...
_______________________________________________
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss

Reply via email to