zfs very poor performance compared to ufs due to lack of cache?

Andriy Gapon avg at freebsd.org
Tue Sep 21 11:25:07 UTC 2010


on 15/09/2010 19:31 Andriy Gapon said the following:
> on 15/09/2010 19:00 Andre Oppermann said the following:
>> Is there a quick way of deciding within sendfile(2) whether a file resides
>> on a filesystem that doesn't use the buffer cache?
> 
> I don't know of any reliable way to do it.
> 

If I understood correctly what Kostik suggested in a chat, then we could abstract
core sendfile<->vm<->fs logic into a new vop, say vop_sendpages (don't mind the
name much).
std_sendpages would do what code in kern_sendfile does today and would be used by
most of filesystems.  But some filesystems could override it e.g. to avoid using
VM page cache.
Or, perhaps, we could even add EXT_ZFSARC type of mbuf that would know how to work
with data buffers held in ARC and unhold them when done.  That would make sendfile
work on ZFS through a single cache.

-- 
Andriy Gapon


More information about the freebsd-net mailing list