Path: utzoo!attcan!uunet!mcsun!ukc!dcl-cs!aber-cs!athene!pcg From: pcg@cs.aber.ac.uk (Piercarlo Grandi) Newsgroups: comp.unix.sysv386 Subject: Re: File system performance Message-ID: Date: 7 Nov 90 17:56:30 GMT References: <294@audfax.audiofax.com> <1990Nov3.124110.2155@metro.ucc.su.OZ.AU> <1990Nov3.222929.2164@servalan.uucp> <1990Nov5.222733.11408@unixland.uucp> Sender: pcg@aber-cs.UUCP Organization: Coleg Prifysgol Cymru Lines: 57 Nntp-Posting-Host: odin In-reply-to: bill@unixland.uucp's message of 5 Nov 90 22:27:33 GMT On 5 Nov 90 22:27:33 GMT, bill@unixland.uucp (Bill Heiser) said: bill> In article <1990Nov3.222929.2164@servalan.uucp> rmtodd@servalan.uucp (Richard Todd) writes: rmtodd> Well, that's how FFS works on other machines (I've hit it on rmtodd> Apple Unix 2.0, which includes Berkeley FFS). Hitting the rmtodd> no-free-blocks limit when you've got 5M free in fragments is a rmtodd> little unusual; Very unusual. bill> Is there something that can be done "on-line" to de-fragment Unix bill> partitions? You are confusing the BSd with the V7 filesystem designs. The BSD filesystem does not get fragmented. You cannot unfragment it. bill> Or is the best bet to just backup and restore the partition using bill> something other than 'dump'? This will not change anything. The BSD filesystem has several block sizes; a file is made up of 4/8KB blocks, up to the last one, which is 0.5/1/2/3/4/5/6/7KB long (a fragment) if the filesize is not a multiple of 4/8KB. If a fragment of the right size cannot be found, a larger one will be split. Eventually you can get to the situation where all full 4/8KB blocks have been split, and so you cannot write any new file large than that. A partial solution is to use as the large block size the smallest that you can define, e.g. 4KB instead of 8KB, which is in general advisable anyhow on a 386. So if you have a choice define your filesystems to have a 4KB fundamental size and a 1KB fragment size, not 8KB/1KB or 4KB/512B. bill> My /usr partition is at 6% fragmentation (according to fsck) This means that 6% of files have a length that is not a multiple of 4/8KB. This seems very low for a news partition. bill> -- The system has only been up for a couple of months, and I've bill> been getting usenet news for a few weeks. That seems like a lot bill> for such a short time. In the BSD filesystem fragementation is not a function of time, but only of the file sizes. In the V7 filesystem fragmentation has a completely different meaning, which could be better described with the word "scattering". As time goes by free blocks and therefore the free list and so new files tend to get scattered around the disc. This often takes very little time (two weeks) to manifest itself. It does not happen with the BSD (or the ISC) filesystems, which keep the free blocks well packed and the free list in order. -- Piercarlo "Peter" Grandi | ARPA: pcg%uk.ac.aber.cs@nsfnet-relay.ac.uk Dept of CS, UCW Aberystwyth | UUCP: ...!mcsun!ukc!aber-cs!pcg Penglais, Aberystwyth SY23 3BZ, UK | INET: pcg@cs.aber.ac.uk