Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 27 May 1999 07:32:37 -0700
From:      Don Lewis <Don.Lewis@tsc.tdk.com>
To:        Graeme Tait <graeme@echidna.com>, freebsd-hackers@FreeBSD.ORG
Cc:        info@boatbooks.com
Subject:   Re: File system gets too fragmented ???
Message-ID:  <199905271432.HAA10749@salsa.gv.tsc.tdk.com>
In-Reply-To: Graeme Tait <graeme@echidna.com> "File system gets too fragmented ???" (May 26,  6:59pm)

next in thread | previous in thread | raw e-mail | index | archive | help
On May 26,  6:59pm, Graeme Tait wrote:
} Subject: File system gets too fragmented ???

} The filesystem is built with 4096 byte blocks, 512 byte fragments, and
} 2048 bytes/inode, and is mounted 'async noatime'.
} 
} It contains about 900,000 files, most of which are small, occupying
} around 2-5 fragments. The small files are updated monthly from a tar
} archive generated offline. In the course of updates, some files may grow
} or shrink by a fragment or so, and some new files are created, and 
} periodically old files are deleted.

If a file shrinks by one fragment, it'll most likely leave a one
fragment gap in the block that can't be reused by another (new) file,
since the the minimum file size is two fragments.  You could easily
get a 12.5% wasteage just from that.

It might help somewhat if a file that grows by a fragment can allocate
the free fragment immediately preceeding it instead of being relocated
to a fresh block.  I don't know if FFS does this or not.

Forcing space optimization full time might help, but this is a pretty
nasty allocation pattern ...


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199905271432.HAA10749>