From owner-freebsd-fs@freebsd.org Mon Dec 26 03:27:09 2016 Return-Path: Delivered-To: freebsd-fs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 12C3FC90B3D for ; Mon, 26 Dec 2016 03:27:09 +0000 (UTC) (envelope-from FreeBSD@shaneware.biz) Received: from ipmail05.adl6.internode.on.net (ipmail05.adl6.internode.on.net [150.101.137.143]) by mx1.freebsd.org (Postfix) with ESMTP id 9BCB6BE4 for ; Mon, 26 Dec 2016 03:27:08 +0000 (UTC) (envelope-from FreeBSD@shaneware.biz) Received: from ppp118-210-147-181.bras1.adl6.internode.on.net (HELO leader.local) ([118.210.147.181]) by ipmail05.adl6.internode.on.net with ESMTP; 26 Dec 2016 13:51:59 +1030 Subject: Re: when ufs is 99% full, current seems to limit creat to 28672 bytes To: gljennjohn@gmail.com, freebsd-fs@freebsd.org References: <201612250331.uBP3Un70004592@fire.js.berklix.net> <20161225111148.6ee769b8@ernst.home> From: Shane Ambler Message-ID: <86167004-c918-f879-e8d9-9abd38e94499@ShaneWare.Biz> Date: Mon, 26 Dec 2016 13:51:56 +1030 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <20161225111148.6ee769b8@ernst.home> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Dec 2016 03:27:09 -0000 On 25/12/2016 20:41, Gary Jennejohn wrote: > On Sun, 25 Dec 2016 04:30:49 +0100 > "Julian H. Stacey" wrote: > >> A puzzle below, that I think I've solved, but comments welcome: >> When ufs is 99% full, current limits creat to 28672 bytes. >> >> Produces loads of little files of size 28672 bytes = 0x7000 >> >> A foreground fsck of FS shows no errors. No ZFS in use. Where >> does all the extra space come from ? Why does it keep allowing >> more little files ? But not files bigger than 7K ? > > I suspect this ia a result of how UFS is designed. Did you use the > standard options for block and fragment size? How about inodes? > Been a while since I looked into filesystem specs but as I recall - My guess is free block fragmentation - I believe on UFS each file is kept in a continuous strip of blocks on disk. If blocks are 8K and the system is unable to find more than one free block between existing files it would prevent a new file over 8k being created, even though there may be MB of free blocks available throughout the filesystem. At a certain fill factor moving files to create enough free space becomes too costly. There is also fragmentation, I understand that multiple (or just two) small files can be stored in one block, so a 3k file can be added to a block that already has a 3k file on it, but it may be unable to find space to create a new 12k file. -- FreeBSD - the place to B...Storing Data Shane Ambler