Fedora Linux Support Community & Resources Center
  #1  
Old 25th April 2005, 11:19 PM
ianmac
Guest
 
Posts: n/a
No defrag needed? Why not?

I continue to see people state that there is no need to defrag a Linux file system. My question is: Why?

From what I understand, files are placed on the hard drive in one continuous line which spirals from the center of the disk to the outer edge. If you have a text file in the middle of the hard drive that is 33kb and there is a file in front of it and a file behind it, what happens when you add 1Mb of text to that text file? Does Linux take that 33kb file, add your 1Mb of data and place the file at the end of the line instead of where it was before you added text? It seems that, by doing this, all the files behind the edited file would be shifted forward one slot to keep from being fragmented and the file you edited would be placed at the end. Seeing as how a large number of files are constantly being edited all the time, it seems that the hard drive would never be at rest and die quicker than a different set up.

Is my thinking off or am I close to being correct? I am just trying to further understand how my wonderful FC3 system works
Reply With Quote
  #2  
Old 25th April 2005, 11:53 PM
jsmaye Offline
Registered User
 
Join Date: Mar 2005
Location: Vandelay Industries
Posts: 127
I just ran this gauntlet, so I'll give the run-down quick and easy - Linux does not place files in contiguous order; rather it places them at specific places on the disk. Windows' file handling evolved from DOS, which was always written as though it were using old, slow, small HDD's and therefore it writes to the outside in to take advantage of faster reads because of faster relative rotation speed.

Linux DOES fragment files (run /usr/sbin/filefrag on a file to see), but less frequently than DOS/Win. Linux's file-handling and journaling routines compensate for the small performance degradation a lightly fragmented system causes, but on a nearly (75% +) full drive, it can become noticeable. At that point, the only option is to spool the files off and write them back, letting the file system re-write them more efficiently.

And remember - though Linux is constantly opening and closing files, a lot of editing is done on small conf files, which either don't expand (e.g., changing an option from 0 - disabled to 1 enabled) or they expand/contract, but stay within their allocated block(s). It has to grow or shrink enough to cross a block boundary for there to be a chance of fragmentation.

There's probably just as great a chance of block "white space" as there is fragmentation.
Reply With Quote
  #3  
Old 26th April 2005, 12:12 AM
ianmac
Guest
 
Posts: n/a
Oh, ok, now I understand better. The "allocation" makes perfect sense. Thank you very much for enlightening me
Reply With Quote
  #4  
Old 26th April 2005, 07:05 AM
jsmaye Offline
Registered User
 
Join Date: Mar 2005
Location: Vandelay Industries
Posts: 127
...and I just found out that there is a defrag utility, but it's in beta...
Reply With Quote
Reply

Tags
defrag, needed

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to defrag Angela Using Fedora 11 11th November 2004 08:38 AM
defrag butters Using Fedora 12 14th September 2004 08:44 AM


Current GMT-time: 09:37 (Wednesday, 22-10-2014)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat
Iguala de la Independencia Travel Photos on Instagram - Livramento do Brumado Instagram Photos - Visalia