Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Distribution: Gentoo 2004.2, Slackware 10, Windows XP, Windows 2003 Server
Posts: 348
Rep:
Why does linux not need defragging?
Quote:
This is similar to how a Windows organizes its data on its hard drive. A computer will slot a new piece of data in an empty area of the hard drive as well. If the file is too big for the slot, it will break it up and put a piece in one slot and another elsewhere.
The next time you ask the computer to open that file it has to move the hard drive's heads twice to grab the two pieces of the file, which takes more time. Disk Defragmenter acts as an organized employee would. The employee would sort through all the books and organize them in categories on the shelves so that customers could find them more readily.
So what is different about linux filesystems (ie ext2, ext3, reiserfs) that makes it so it doesn't have to defragment?
basically because before it writes stuff to disk it finds somewhere suitable to put it, rather than finding the first space on the disc platter and moving on if it's in trouble. with lots of large files, a file system will always fragment, but that's just natural to a low degree.
There was actually an article in PC magazine a while ago about how they tried to figure out the best defrag program for windows XP (they were using them on an office file server that got heavy use). They found not one program that improved performance at all! The programs were not flawed, the idea of defragmenting no longer makes sense with modern a OS. Drives are faster now also.
I couldn't find the magazine article, but here is another...
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.