On Tuesday 11 February 2003 14:23, Paul Johnson wrote: > On Mon, Feb 10, 2003 at 09:47:27AM -0800, Itsik Aviad wrote: > > Which leads me to believe that I probably need to defragment the > > hard drive. > > Nope. This isn't a problem. You can probably find the technical > reasons behind this on Google, I can't remember them off the top of my > head.
Ext2 and ext3 try to keep the blocks of a file as close together as possible, which usually keeps fragmentation low for quite some time, there are cases however where things aren't looking that bright; especially if the filesystem is nearly full and you delete random files fragmentation starts getting quite bad. Another big problem are files that grow very slowly, such as mail files, since in such a case the writes span many, many file system transactions which makes it impossible for the fs to properly coalesce the writes. People with busy mail spools often resort to a setup with two identical partitions, doing a cp -a and then swapping the mountpoints to get around this problem. Actually the only way to properly solve this seems to be some sort of genuine online defragmentation, something that Andrew Morton is (was?) working on; to quote him: "Now, I think it's fair to say that the ext2/ext3 inter-file fragmentation issue is one of the three biggest performance problems in Linux. (The other two being excessive latency in the page allocator due to VM writeback and read latency in the I/O scheduler). The fix for interfile fragmentation lies inside ext2/ext3, not inside any generic layers of the kernel. And this really is a must-fix, because the completion time for writeback is approximately proportional to the size of the filesystem. So we're getting, what? Fifty percent slower per year? [1] "The algorithm for placing directory inodes is the biggest performance problem in ext2 and ext3. I did a truckload of work on that last year. I ended up concluding that we need online defrag, which will enable the placement of directory inodes in the same block group as their parent. We're talking a 5x speedup for some common workloads here." [2] Cheers, Yven [1]: http://www.uwsg.iu.edu/hypermail/linux/kernel/0203.1/0539.html [2]: https://listman.redhat.com/pipermail/ext3-users/2002-March/003029.html -- Yven Johannes Leist - [EMAIL PROTECTED] http://www.leist.beldesign.de -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]