From owner-freebsd-hackers@FreeBSD.ORG Tue Aug 23 09:52:25 2011 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 27F36106564A for ; Tue, 23 Aug 2011 09:52:25 +0000 (UTC) (envelope-from freebsd-hackers@m.gmane.org) Received: from lo.gmane.org (lo.gmane.org [80.91.229.12]) by mx1.freebsd.org (Postfix) with ESMTP id A864D8FC0A for ; Tue, 23 Aug 2011 09:52:24 +0000 (UTC) Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1Qvneh-0004W1-KA for freebsd-hackers@freebsd.org; Tue, 23 Aug 2011 11:52:23 +0200 Received: from lara.cc.fer.hr ([161.53.72.113]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 23 Aug 2011 11:52:23 +0200 Received: from ivoras by lara.cc.fer.hr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 23 Aug 2011 11:52:23 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-hackers@freebsd.org From: Ivan Voras Date: Tue, 23 Aug 2011 11:52:09 +0200 Lines: 30 Message-ID: References: <4E4D50CD.5080806@rawbw.com> <20110823012326.GA29658@server.vk2pj.dyndns.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: lara.cc.fer.hr User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.12) Gecko/20101102 Thunderbird/3.1.6 In-Reply-To: <20110823012326.GA29658@server.vk2pj.dyndns.org> X-Enigmail-Version: 1.1.2 Subject: Re: ZFS installs on HD with 4k physical blocks without any warning as on 512 block size device X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Aug 2011 09:52:25 -0000 On 23/08/2011 03:23, Peter Jeremy wrote: > On 2011-Aug-22 12:45:08 +0200, Ivan Voras wrote: >> It would be suboptimal but only for the slight waste of space that would >> have otherwise been reclaimed if the block or fragment size remained 512 >> or 2K. This waste of space is insignificant for the vast majority of >> users and there are no performance penalties, so it seems that switching >> to 4K sectors by default for all file systems would actually be a good idea. > > This is heavily dependent on the size distribution. I can't quickly > check for ZFS but I've done some quick checks on UFS. The following > are sizes in MB for my copies of the listed trees with different UFS > frag size. These include directories but not indirect blocks: > > 1b 512b 1024b 2048b 4096b > 4430 4511 4631 4875 5457 /usr/ncvs > 4910 5027 5181 5499 6133 Old FreeBSD SVN repo > 299 370 485 733 1252 /usr/ports cheched out from CVS > 467 485 509 557 656 /usr/src 8-stable checkout from CVS > > Note that the ports tree grew by 50% going from 1K to 2K frags and > will grow by another 70% going to 4KB frags. Similar issues will > be seen when you have lots of small file. I agree but there are at least two things going for making the increase anyway: 1) 2 TB drives cost $80 2) Where the space is really important, the person in charge usually knows it and can choose a non-default size like 512b fragments.