I have done many tests with this now, over the last month+. I figured it was worth it to figure out for myself since no one else could tell me whether it was worth it or not. I got a lot of answers like that above that you never need to defrag in Linux cause it defeats the purpose of the OS or some such mularky. So in my tests, I am asuming a personal computer, cause this test really is for me. For servers, this test really wouldn't do much, because the files in use would be massively different than those I am using and so would the applications.
Steps:
Install xfs_dump toolset, xfs_progs does not have the right tools, which however, I also have installed and is available from the install discs, ftp.suse.com and other places. For those of you on SuSE like me:
first you need dmapi(the only prereq that wasn't installed for me)-
http://rpm.pbone.net/index.php3/stat....i586.rpm.html
then you need xfs_dump-
http://rpm.pbone.net/index.php3/stat....i586.rpm.html
Once installed, you can now access the tools you need, like xfs_frs(the actual defragging tool) and some tests including blocksize tests, fragmentation tests, etc.
Test setup:
I used the box I have, as why not, get a more real feel for use.
P4a 1.5
ECS Elitegroup P4ITA with Intel 850 chipset
768Mb rdram(2x256 PC600 and 2x128 PC800 all running at PC400, the board's max)
Brand new(okay like 2 or 3 months old now, but very newish) 80Gig WD HD
OpenSuSE, SuSE 10.0 with various Kernels from 2.6.14 to 2.6.15rc6
XFS file system
Radeon 9600XT(not that video matters)
During my tests, I tested the harddrive at various capacities with vairous file
sizes(mostly using various sizes of mp3s(small) about 4mb-8mb or medium videos 300mbish or large, a 4gig file for a windows installer of a large MMORPG.(duplicated many times when needed.
I figured it would be good enough to start where I was at a 13% capacity first. Real use with a few videos, some mp3s, and a bunch of applications and various documents and websites I am working on. fragmentation levels are basically nonexistent which is good, as that is how XFS and the linux kernel are supposed to act. and even after a defrag(which changed nothing) no performance gain(not shocking).
Going whole hog: 99.7% capacity, my 13% plus as many instances of the 4gig file as I could. Then doing many deletes, installs and uninstalls and reinstalls of software trying to tax it out, and recopies of the deleted files. This achieved what I call dramatic results. A 30% fragmentation rating. So I tried defragging, and not surprisingly it barely did anything because most files couldn't be moved given such a massive overuse and fill of the drive. I got it down to 28%, with no noticable performance gain.
Whole hog was obviously unrealistic, too many massive files, and filling it ALL the way up, which is really bad, and anyone actually doing it has problems of their own, and they caused theirs. So I deleted all the big useless files, and got back to my original, usable 13% and defragged, just to make the test fair. So now a more realistic 66% file with various videos and mp3s, and a bit of install/uninstall as a normal user might. This achieved a little bit of a shock, with barely any fragmentation at all, and no gain in fragmenting.
Conclusions:
So given a realistic usage of your computer, and a practical amount of space on the drive, you really are not off poorly from what I can tell in Linux with XFS. That said, people who are not... well let's just say people who aren't smart, and max out their drives storage, which again is really bad practice, can forcibly fragment the drive. But if you use the computer normally, at least over the minimal span of a month or two, it isn't that detrimental not to defrag. Over the span of a year, two, or more, has yet to be seen, but from my results, unless using biggity big files to purposely junk up the drive, no real problems should really arise.
So basically, assuming a normal, but good usage of your computer, it should be fine with or without defrag. The option is there, and in certain circumstances like the one I contrived, or according to some, P2P and other specific applications, you will need it. But for me, it is comforting knowing I can defrag should the need arise, but I am thrilled knowing the need probably won't.