From owner-freebsd-current@FreeBSD.ORG Mon Feb 11 17:05:21 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 0A64E16A41A for ; Mon, 11 Feb 2008 17:05:21 +0000 (UTC) (envelope-from me@lexasoft.ru) Received: from mmx.lexasoft.ru (mmx.lexasoft.ru [92.241.160.6]) by mx1.freebsd.org (Postfix) with ESMTP id B6D2C13C45A for ; Mon, 11 Feb 2008 17:05:20 +0000 (UTC) (envelope-from me@lexasoft.ru) Received: from [10.100.0.2] (petrovich-telecom-gw.wahome.ru [77.91.225.38]) by mmx.lexasoft.ru (Postfix) with ESMTPSA id B28AA2844A for ; Mon, 11 Feb 2008 17:05:17 +0300 (MSK) Message-Id: <50186FCD-F67F-4144-BDF1-FB9A7F9AAB64@lexasoft.ru> From: Alexey Tarasov To: current@freebsd.org In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed; delsp=yes Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Apple Message framework v915) Date: Mon, 11 Feb 2008 20:05:18 +0300 References: <9DA6FFCD-11DB-4580-9314-52B0885351D8@lexasoft.ru> X-Mailer: Apple Mail (2.915) Cc: 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 17:05:21 -0000 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 =20 file system on the same disk, rtorrent hashing works 10 times faster. =20= And while hashing, HDD is used three times intensively with ZFS =20 (noticed by flashing LED). I have an amd64 Core2Duo processor, 4 Gb of RAM, what is not enough =20 for ZFS? What kernel tuning can help me? On 11.02.2008, at 17:38, Ivan Voras wrote: > Alexey Tarasov wrote: >> Hello. >> >> I am trying to use ZFS to store my torrent downloads. I noticed that >> hashing in rtorrent works 10 times slower than the same disk with =20 >> UFS. > > I've done some extensive file system testing and here are my results > with bonnie++ for UFS+SU vs ZFS on AMD64, 6 GB RAM (1 GB for kmem), =20= > on a > RAID10 volume of 15 kRPM SAS drives: > > UFS+SU: write: 109 MB/s, read: 111 MB/s, random file creation: 36500 =20= > f/s > ZFS: write: 95 MB/s, read: 180 MB/s (!!), random file creation: =20 > 40522 f/s > > Read speed for ZFS seems too high to be valid, it's probably some =20 > cache > effects (though tests were done on a file more than twice the RAM =20 > size). > In any case, ordinary hashing should cause sequential reading, and =20 > these > seem really fast. > > There could be one more thing: ZFS tries to write data sequentially, > like a log file system, and if the download was done in "parallel", =20= > many > pieces from different areas of the file at the same time (which is > normally the case for torrents), it might have gotten very =20 > fragmented on > the drive. > > You can verify this by creating a similarily-sized ordinary file =20 > with dd > (the file should be large enough not to fit in the memory cache, or =20= > the > test should be done after a reboot) and then run iostat in one console > while reading the files (separately, one at a time, with dd or cat) in > another. A very fragmented file should have significantly higher tps =20= > count. > > _______________________________________________ > freebsd-current@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to = "freebsd-current-unsubscribe@freebsd.org=20 > " -- Alexey Tarasov (\__/) (=3D'.'=3D) E[: | | | | :]=D0=97 (")_(")