It appears you have not registered with our community. To register please click here ...

Author Topic: Does Linux Require Defrag?  (Read 1662 times)

ctwjr

  • Super Moderator
  • Jr. Member
  • **
  • Posts: 72
  • Karma: +10/-0
    • View Profile
    • http://www.ftplive.com
    • Email
Does Linux Require Defrag?
« on: January 10, 2007, 02:36:30 PM »
Do I have to defragment my Linux filesystem like in Windows?

zelo

  • Super Moderator
  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 264
  • Karma: +10/-0
    • ICQ Messenger - 233717
    • MSN Messenger - webmaster@zelo.com
    • Yahoo Instant Messenger - zelo@yahoo.com
    • View Profile
    • http://www.zelo.com
    • Email
Does Linux Require Defrag?
« Reply #1 on: January 24, 2007, 07:58:10 PM »
This is unlikely.

Windows and Linux store their files in different manners (and have different philosophies as to why they do what they do).

Windows stores all its files sequentially close to the real (the part of the platter furthest in). The thinking here is that if the drive has to travel a shorter distance, files will be accessed faster. Here is the problem.

Our first file will say HELLO, WORLD. Our second file will say I DID IT. This is very rudementary but will prove a point...

[COLOR="Blue"]HELLO_WORLD[/COLOR][COLOR="Red"]I_DID_IT[/COLOR]

This is very compact and if I wanted to access either file 1 (Hello World) or file 2 (I DID IT) they would be very close and would take little seek time to find them.

But, what if I wanted to add a ! to the first file to make it more dramatic? There is no room after HELLO WORLD so I need to seperate (fragment) the file
[COLOR="Blue"]HELLO_WORLD[/COLOR][COLOR="Red"]I_DID_IT[/COLOR][COLOR="Blue"]![/COLOR]

You can imagine with thousands of files and hundreds of thousands of edits of those files... there would be fragments (segments/pieces...) of files all over the disk. Now the disk has to start/stop/start/stop which is inefficient and the reason you need to fragment often in Windows.

In LINUX, the files are stored all over the DISK
[COLOR="blue"]HELLO WORLD[/COLOR]
[COLOR="sandybrown"]empty space
empty space[/COLOR]
[COLOR="Red"]I DID IT[/COLOR]

Now if I want to add an ! to emphasize my point I have room after the file to do so.
[COLOR="blue"]HELLO WORLD
![/COLOR][COLOR="SandyBrown"]mpty space
empty space[/COLOR]
[COLOR="Red"]I DID IT[/COLOR]

The thought process here is the pointer (the reader of the platter of the hard disk) can sit in the middle of the disk ½ way to the data at a worst-case scenario.

The only time you will find you would need to defragment a Linux disk regularly is if you have the disk near full capacity and are changing the contents frequently.

Hence, my friends, this is the reason you don\'t have a handy-dandy defragmenter that comes with your distro of Linux.

 

Related Topics

  Subject / Started by Replies Last post
0 Replies
270 Views
Last post December 02, 2005, 08:52:01 AM
by Linux News
0 Replies
422 Views
Last post December 28, 2005, 05:42:45 AM
by Linux News
0 Replies
483 Views
Last post January 03, 2006, 06:08:41 AM
by Linux News
0 Replies
1525 Views
Last post September 15, 2006, 03:25:01 PM
by dynaweb
3 Replies
144438 Views
Last post April 04, 2007, 09:38:13 PM
by ctwjr