Re: File Fragmentation
- From: Robert Heller <heller@xxxxxxxxxxxx>
- Date: Mon, 05 Dec 2005 23:10:57 +0100
Cliff Hewitt <somebug@xxxxxxxxxxxxxx>,
In a message on Mon, 05 Dec 2005 20:37:49 GMT, wrote :
CH> stan@xxxxxxxxxxxxxxxxxx wrote:
CH>
CH> > <snipped>
CH>
CH> > option (1) is know as defrag and doing that on-demand would be VERY abusive
CH> > so won't be found on any common fs.
CH>
CH> Mostly, my reason for asking is that I see files in my non-/home,
CH> non-/var/log directories that are fragmented. I'm not too concerned
CH> about this unless the file system accesses these files frequently. I
CH> don't believe it does, or conversely, if it does I don't notice it.
The 'fragmentation' of files on ext2/ext3 (at this level they are the
same file system) is only an issue WRT performance when the file system
is very full (say > 90% full). So long as the file system has plenty of
free space, the fragmentation is simply a non-issue.
CH>
CH> However, I can think of times in other data structures where we'd go
CH> ahead and re-hash all of the data, rearranging the data in order to
CH> optimize performance. It can be shown that the total time taken per
CH> re-hash is the same as the total time taken to re-hash all at once, from
CH> an algorithmic point of view. On the other hand, we notice when the
CH> re-hashing is done all-at-once versus on a case-by-case basis. Do the
CH> file systems mentioned ever perform this type of maintenance on their own?
No. In the normal course of things -- as files are created, deleted,
re-created, etc. a certian amount of data shuffling goes on. Not so
much as to 'optimize performance' anything -- it just happens. So long
as there is 'plenty' of free space most of the time, performance remains
more or less linear over time.
CH>
CH> > option (2) is the normal result soas you add files you end
CH> > up with fragmentation. At some point if there is a good reason
CH> > to do so, you defrag. If not you don't.
CH>
CH> Right -- just trying to find that point for something with which I have
CH> less experience.
What generally happens in the Linux/UNIX world is that over a period of
time the disk gets mostly full. Usually, by this time, it is decided
(by the owner of the machine) that maybe it is time for a
newer/bigger/faster disk. Such a disk is acquired and formatted fresh,
with larger partitions and the data is copied (disk-to-disk backup).
This results in a new file system that is no longer mostly full and is
completely 'defragmented' (or at least is only normally fragmented). At
least this is what happens to me. Except for various special cases I
usually don't have to worry about disks getting over about 90% full (of
non junk files) until it is time to upgrade the disk anyway. Yes,
sometimes some program barfs and fills up the disk with junk data, which
can cause disk performance problems.
CH>
CH> > To defrag you can do a backup/clean up/restore cycle or use
CH> > a defrag tool. In most cases this won't be necessary.
CH> >
CH> > Stan
CH> >
CH>
CH> Thanks,
CH>
CH> Cliff Hewitt
CH>
\/
Robert Heller ||InterNet: heller@xxxxxxxxxxxx
http://www.deepsoft.com/ ||FidoNet: 1:321/153
http://www.deepsoft.com/~heller /\
.
- Follow-Ups:
- Re: File Fragmentation
- From: Cliff Hewitt
- Re: File Fragmentation
- References:
- File Fragmentation
- From: Cliff Hewitt
- Re: File Fragmentation
- From: stan
- Re: File Fragmentation
- From: Cliff Hewitt
- File Fragmentation
- Prev by Date: Re: File Fragmentation
- Next by Date: Re: File Fragmentation
- Previous by thread: Re: File Fragmentation
- Next by thread: Re: File Fragmentation
- Index(es):
Relevant Pages
|