Maurice Volaski
2005-Jun-17 22:28 UTC
[Q] Is this true and does it mean there is dynamic defragmentation in ext2/3?
Someone recently posted the following statement midway down the page at http://forums.gentoo.org/viewtopic-t-305871-postdays-0-postorder-asc-highlight-ext3+ordered+data-start-25.html>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? -- Maurice Volaski, mvolaski at aecom.yu.edu Computing Support, Rose F. Kennedy Center Albert Einstein College of Medicine of Yeshiva University
Theodore Ts'o
2005-Jun-18 19:14 UTC
[Q] Is this true and does it mean there is dynamic defragmentation in ext2/3?
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