<div class="gmail_quote">On Sat, Sep 11, 2010 at 10:01 PM, Ron Frazier <span dir="ltr"><<a href="mailto:atllinuxenthinfo@c3energy.com">atllinuxenthinfo@c3energy.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
I am interested in what everyone thinks as to the need for defrag on EXT4<br>
in Linux vs the need for it with NTFS and Windows.<br></blockquote><div><br>I had written a fairly lengthy post on this only to have it eaten before I hit “Send”. Grr.<br><br>A good place to start reading is the Wikipedia article on filesystem fragmentation (<a href="http://en.wikipedia.org/wiki/File_system_fragmentation">http://en.wikipedia.org/wiki/File_system_fragmentation</a>) which provides a good overview of the subject. Like anything on Wikipedia, you can spend hours upon hours reading there.<br>
<br>Without going to a great deal of effort (we just got back from Toledo and I am about ready to have a long, long sleep), operating systems such as DOS and Windows require filesystem defragmentation as a matter of routine operation. The problem could be mitigated somewhat if different types of files were on different filesystems (e.g., if C:\, C:\Windows, C:\Users, C:\Program Files and C:\Program Files (x86) were all their own partitions), because then updates to the operating system or user profiles would have no effect on each other. This is one reason why a UNIX system with multiple partitions does not suffer (as much) from the symptoms of file fragmentation. Furthermore, if you can put filesystems that are likely to suffer a great deal of fragmentation on their own drives, you can reduce the symptoms even further.<br>
<br>I've never even thought to check fragmentation on my drives at home, nor on the small business servers that I run; filesystem I/O is not a problem on my systems in that regard. I do keep things heavily separated and partitioned, and I try hard to keep temporary data on RAM disks instead of real filesystems. If I do need a large amount of temporary storage on a system, I'll give it its own dedicated filesystem instead of having it share a mount point with the root filesystem or similar; I've always found it to be good practice to keep partitions separated from each other by functional task. Not only does it mean that fragmentation isn't a problem across those filesystems, but it means that it's easy to work with backing up and restoring an individual filesystem based on its purpose (and since some filesystems change less frequently than others, it is somewhat easier to back up data efficiently).<br>
<br>Anyway, that's really all I've the energy to spew forth tonight. Of course, if you're interested, there is _plenty_ out there to search about and read up on. I'd recommend starting with learning about relatively simple filesystems like the FAT family, and then research progressively more complex filesystems and what functionality they provide. Then start looking into various different implementations of those filesystems (usually, operating system kernels) to see how they combat (or ignore!) the problems of filesystem fragmentation and other filesystem agnostic issues.<br>
<br>Filesystems can be a very fascinating thing to learn about...<br></div></div>