On May 27, 5:07am, Graeme Tait wrote:
} Subject: Re: File system gets too fragmented ???
} I've received several answers along this direction, but I want to emphasize
one
} point that I think is being overlooked. When the filesystem is fresh and a
new
} archive is expanded to create ~900,000 small files each of 2-5 512 byte frags
} in size, the filesystem appears quite well-behaved, and space seems to be
} efficiently utilized.
}
} The problem seems to be that with successive updates that slightly change the
} size of files, or add or delete files, that a large number of unallocated
} fragments are created.
}
} I don't understand how the FFS stores files of sub-block size. Do the
fragments
} used need to be contiguous, or entirely within a single block?
Yes and yes.
} The choice of 512 byte frags is based on average wastage per file of half a
} frag, or about 230MB with 900,000 files. It's quite possible that a 2k
frag/16k
} blocksize would improve utilization of fragments, as the vast majority of
files
} would then fit in a single fragment, but in this case there would be of order
} 800MB wastage, and the files would not fit the existing disk.
You might try unmounting the filesystem and doing
tunefs -o space /dev/rawdevice
(which can also be done at newfs time). You may find that the
performance, especially write performance, isn't too good.
To Unsubscribe: send mail to [email protected]
with "unsubscribe freebsd-hackers" in the body of the message