From owner-freebsd-current@FreeBSD.ORG Mon Feb 11 20:28:25 2008 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3DD7716A41B for ; Mon, 11 Feb 2008 20:28:25 +0000 (UTC) (envelope-from kris@FreeBSD.org) Received: from weak.local (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 8ADC713C458; Mon, 11 Feb 2008 20:28:24 +0000 (UTC) (envelope-from kris@FreeBSD.org) Message-ID: <47B0AFE6.6070503@FreeBSD.org> Date: Mon, 11 Feb 2008 21:28:22 +0100 From: Kris Kennaway User-Agent: Thunderbird 2.0.0.9 (Macintosh/20071031) MIME-Version: 1.0 To: Alexey Tarasov References: <9DA6FFCD-11DB-4580-9314-52B0885351D8@lexasoft.ru> <50186FCD-F67F-4144-BDF1-FB9A7F9AAB64@lexasoft.ru> In-Reply-To: <50186FCD-F67F-4144-BDF1-FB9A7F9AAB64@lexasoft.ru> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: current@freebsd.org Subject: Re: Disappointing speed with ZFS X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Feb 2008 20:28:25 -0000 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). Kris