From owner-freebsd-current@FreeBSD.ORG Mon Feb 11 14:39:04 2008 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CB19116A419 for ; Mon, 11 Feb 2008 14:39:04 +0000 (UTC) (envelope-from freebsd-current@m.gmane.org) Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by mx1.freebsd.org (Postfix) with ESMTP id 8206E13C44B for ; Mon, 11 Feb 2008 14:39:03 +0000 (UTC) (envelope-from freebsd-current@m.gmane.org) Received: from list by ciao.gmane.org with local (Exim 4.43) id 1JOZo7-0002Jn-9f for freebsd-current@freebsd.org; Mon, 11 Feb 2008 14:38:55 +0000 Received: from 213.202.123.79 ([213.202.123.79]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 11 Feb 2008 14:38:55 +0000 Received: from ivoras by 213.202.123.79 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 11 Feb 2008 14:38:55 +0000 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-current@freebsd.org From: Ivan Voras Date: Mon, 11 Feb 2008 15:38:48 +0100 Lines: 29 Message-ID: References: <9DA6FFCD-11DB-4580-9314-52B0885351D8@lexasoft.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 213.202.123.79 User-Agent: Thunderbird 1.5.0.14 (Windows/20071210) In-Reply-To: <9DA6FFCD-11DB-4580-9314-52B0885351D8@lexasoft.ru> X-Enigmail-Version: 0.94.1.0 Sender: news 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 14:39:04 -0000 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 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), on a RAID10 volume of 15 kRPM SAS drives: UFS+SU: write: 109 MB/s, read: 111 MB/s, random file creation: 36500 f/s ZFS: write: 95 MB/s, read: 180 MB/s (!!), random file creation: 40522 f/s Read speed for ZFS seems too high to be valid, it's probably some cache effects (though tests were done on a file more than twice the RAM size). In any case, ordinary hashing should cause sequential reading, and 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", many pieces from different areas of the file at the same time (which is normally the case for torrents), it might have gotten very fragmented on the drive. You can verify this by creating a similarily-sized ordinary file with dd (the file should be large enough not to fit in the memory cache, or 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 count.