[Q] Is this true and does it mean there is dynamic defragmentation in ext2/3?

Theodore Ts'o tytso at mit.edu
Sat Jun 18 19:14:51 UTC 2005


On Fri, Jun 17, 2005 at 06:28:03PM -0400, Maurice Volaski wrote:
> >You don't need to defragment ext2/ext3 because as you use the 
> >filesystem file blocks and inodes are moved around and reallocated 
> >to keep the data nearly contiguous. It's not perfect, but it works 
> >fairly well and you should almost never see a performance 
> >degradation caused by the filesystem's fragmentation.
> 
> Is this statement accurate and does it mean ext2/3 is performing a 
> sort of dynamic defragmentation?

No, not true.  (At least not today)

Ext2/3 has advanced algorithms to make sure that the blocks that are
allocated avoid fragmentation, but it is not doing any kind of dynamic
moving of blocks/inodes.  

(At least, not yet; there has been some talk about creating enough
kernel hooks so that a user-space program could do dynamic
defragmentation of the filesystem, but none of this exists at the
moment.)

						- Ted




More information about the Ext3-users mailing list