Joerg Schilling wrote:
Phil Harman <phil.har...@sun.com> wrote:

ZFS doesn't mix well with mmap(2). This is because ZFS uses the ARC instead of the Solaris page cache. But mmap() uses the latter. So if anyone maps a file, ZFS has to keep the two caches in sync.

cp(1) uses mmap(2). When you use cp(1) it brings pages of the files it copies into the Solaris page cache. As long as they remain there ZFS will be slow for those files, even if you subsequently use read(2) to access them.

If you reboot, your cpio(1) tests will probably go fast again, until

Do you believe that reboot is the only way to reset this?

No, but from my iPod I didn't have the patience to write a fuller explanation :)

See ...

http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/uts/common/fs/zfs/zfs_vnops.c#514

We take the long path is the vnode has any pages cached in the page cache.

So instead of a reboot, you should also be able to export/import the pool or unmount/mount the filesystem.

Also, if you didn't touch the file for a long time, and had lots of other page cache churn, the file might eventually get expunged from the page cache.

Phil
_______________________________________________
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss

Reply via email to