Re: Disappointing speed with ZFS

From: Pawel Jakub Dawidek <pjd_at_FreeBSD.org>
Date: Sat, 15 Mar 2008 15:18:43 +0100
On Mon, Feb 11, 2008 at 09:28:22PM +0100, Kris Kennaway wrote:
> Alexey Tarasov wrote:
> >I've done similar tests on the other machine, and all looks fine.
> >
> >But why on this machine ZFS works slower than UFS? When I make UFS file 
> >system on the same disk, rtorrent hashing works 10 times faster. And 
> >while hashing, HDD is used three times intensively with ZFS (noticed by 
> >flashing LED).
> >
> >I have an amd64 Core2Duo processor, 4 Gb of RAM, what is not enough for 
> >ZFS?
> >
> >What kernel tuning can help me?
> 
> I'd guess this is just related to the ZFS design.  As Ivan says, it 
> prefers to do all writes sequentially.  This means that reads (as with 
> reading of hashes) may be very fragmented and require lots of drive 
> seeking, which will reduce performance a lot.  ZFS does do aggressive 
> prefetching of data to try and offset this problem, but if your disk 
> bandwidth is low (e.g. you are not using a fast disk array) then it may 
> not help much (and can also introduce big I/O latency for other operations).
> 
> As for what can be done about this, I don't know, but you should look 
> into the general ZFS literature (ZFS support mailing lists, etc).

It may also be because ZFS send FLUSH requests to the disk quite often.
If disk or controller handles those requests slowly, it may case
performance drop when comparing to UFS, which doesn't send FLUSH
requests at all. To verify this, one should try disable FLUSH requests
sending by adding:

	vfs.zfs.cache_flush_disable=1

to /boot/loader.conf.

-- 
Pawel Jakub Dawidek                       http://www.wheel.pl
pjd_at_FreeBSD.org                           http://www.FreeBSD.org
FreeBSD committer                         Am I Evil? Yes, I Am!

Received on Mon Mar 17 2008 - 13:46:30 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:29 UTC