Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's 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.
In Windows it was recommended that the hard disk(s) be defragmented regularly. I have not heard of anything about defragmenting on Linux. Does it apply in Linux? If so, how? If not, why not?
Defragmentation is generally not an issue on Linux.
Some defragmentation happens, but, by and large, Linux journaling file systems deal with it in a manner transparent to the user (that is a fancy way of saying "behind the scenes").
I read somewhere--several years ago and I don't have the link--that, with or without defragmentation utilities--the percentage defragmentation on Linux disks is pretty much steady.
(Defragmentation is not really much of a performance issue on an NTFS file system either, at least as regards performance, because the NTFS MFT remembers the location of all the pieces of a file and loads them simultaneously. On FAT, the file allocation table remembers only the location of the the beginning of each file, then each successive piece of the file points to the next piece, so a heavily fragmented file system slows performance noticeably. But NTFS does not natively manage defragmentation as well as Linux journaling file systems. The preceding tidbit is courtesy of my Windows 2000 server class in 2001.)
I would say that you don't really need to defragment your HDD in Windows if you have a modern hardware because you probably won't notice any speed improvement. I noticed some speed improvements on Pentium 166 MMX system back in 90's (running Windows 98 SE). But not today.
I would say that you don't really need to defragment your HDD in Windows if you have a modern hardware because you probably won't notice any speed improvement. I noticed some speed improvements on Pentium 166 MMX system back in 90's (running Windows 98 SE). But not today.
I think what Mr.Alex was implying is that it's not nearly as noticeable on NTFS as it was with FAT32, and I have to agree. FrankBell's writeup (post#3) gives an excellent explanation on that very subject.
IMHO, FAT32 was a miserable POS, that's why it was only released with one OS (Win98) and replaced 2 years later (Win ME). The way files were (mis)handled created fragmentation simply by booting the system, and fragmentation caused serious performance issues as well as file system errors. That simply does not happen with NTFS.
Back to the subject of Linux fragmentation, after 2-1/2 years running Ubuntu 8.04, my HDD was only 2% fragmented. You won't do that with any version of Windows.
I normally don't run defrag on Windows machines with one exception: before installing a dual boot of Linux so that the windows files are all compacted towards the start of the partition that I need to shrink down.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.