Gary Mills wrote:
On Sat, Jul 04, 2009 at 08:48:33AM +0100, Phil Harman 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.
That's the first I've heard of this issue. Our e-mail server runs
Cyrus IMAP with mailboxes on ZFS filesystems. Cyrus uses mmap(2)
extensively. I understand that Solaris has an excellent
implementation of mmap(2). ZFS has many advantages, snapshots for
example, for mailbox storage. Is there anything that we can be do to
optimize the two caches in this environment? Will mmap(2) one day
play nicely with ZFS?
I think Solaris (if you count SunOS 4.0, which was part of Solaris 1.0)
was the first UNIX to get a working implementation of mmap(2) for files
(if I recall correctly, BSD 4.3 had a manpage but no implementation for
files). From that we got a whole lot of cool stuff, not least dynamic
linking with ld.so (which has made it just about everywhere).
The Solaris implementation of mmap(2) is functionally correct, but the
wait for a 64 bit address space rather moved the attention of
performance tuning elsewhere. I must admit I was surprised to see so
much code out there that still uses mmap(2) for general I/O (rather than
just to support dynamic linking).
Software engineering is always about prioritising resource. Nothing
prioritises performance tuning attention quite like compelling
competitive data. When Bart Smaalders and I wrote libMicro we generated
a lot of very compelling data. I also coined the phrase "If Linux is
faster, it's a Solaris bug". You will find quite a few (mostly fixed)
bugs with the synopsis "linux is faster than solaris at ...".
So, if mmap(2) playing nicely with ZFS is important to you, probably the
best thing you can do to help that along is to provide data that will
help build the business case for spending engineering resource on the issue.
Cheers,
Phil
_______________________________________________
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss