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

Andriy Gapon avg at freebsd.org
Wed Sep 15 15:38:21 UTC 2010


on 15/09/2010 18:15 Andriy Gapon said the following:
> on 15/09/2010 18:04 Steven Hartland said the following:
>> Hmm, so taking a different track on the issue is the a way to make sendfile use data
>> directly from ARC instead of having to copy it first?
> 
> Well, theoretically everything is possible, but I am not sure if it's feasible.
> It's a lot of work anyways, it should be a very specialized sendfile and a lot if
> inter-layer knowledge and dependencies.
> Don't hold your breath for it.

Perhaps some middle-ground solution can be developed with less effort.
This solution would be specific to filesystems that don't use buffer cache, so it
wouldn't touch any pages, but instead it would use regular VOP_READ into a mbuf.
So, there would be copying, but page caches won't be unnecessarily "polluted" with
second copy of the data and this all would happen in kernel giving an advantage
over userland solution with read(2)+send(2).

Having said that, I see that OpenSolaris has a mechanism for something like that.
The mechanism can either globally enabled or enabled for file over certain size.
The mechanism uses dedicated kernel threads that get data using direct I/O, buffer
and send it.
That's my impression from a quick look, I may have gotten things wrong.

-- 
Andriy Gapon


More information about the freebsd-fs mailing list