Linux actually avoids major fragmentation by writing to the disk in an 
intelligent manner.

Say you have a five kilobyte file. Then first avaliable space on your 
disk is two kilobytes, the next is nineteen kilobytes.

Windows [9x or NT/2k] will write the first two byes of the file to the 
2KB space, and the rest to the start of the 19KB space, fragmnenting the 
file.

Linux will skip the 2K space and write the whole 5KB file unfragmented to 
the 19KB space.

That's a bit of an oversimplification [there's much more to consider 
regarding the most optimal layout of data on a disk] but basically, Linux 
Has Brains, Windows Does Not. :-)

Linux also comes with an inbuilt defragmenter [so does Windows 9x, 2K has 
a cut down version,  and NT doesn't]. 

Its run automatically [by default] every forty times you mount the disk. 
This value [called the `maximal mount count'] can be changed if you 
prefer another value.

For Ext2 filesystems, use tune2fs's -c option. For ReiserFS systems - I'm 
not too sure. Does someone what to enlighten me?

AFAIK, there's no GUI utilities to help you out with disk tuning, but its 
not too hard to type.

Mike


------------------------------------------
Mike MacCana            Support Consultant  
          C Y B E R S O U R C E
   Level 9, 140 Queen St Melbourne 3000
Ph : +61 3 9642 5997 Fax: +61 3 9642 5998

On Tue, 26 Dec 2000, Brian Hartman wrote:

> On Tue, 26 Dec 2000, you wrote:
> > Every 20 times starting linux, the system check the harddrive partition,
> > ; this is OK. I have the linux in two partition (hda5 and hda7) and the
> > swap partition to.
> > When the system check the partition hda5 shows 0.2% non contiguous, but
> > hda7 shows 2.5% non contiguous blocks and this is every time increasing.
> > Is there any way to reduce this fragmentation?
> > I am runing Mandrake 7.2 with kde 2.01
> >
> > Thanks for your help.
> >
> > Francisco Alcaraz
> > Murcia (Spain)
> 
> Fransisco,
> 
> I'm not an expert at this, but it's my understanding that some fragmentation 
> is normal with Linux.  I always have a little (2-3%) fragmentation on my 
> drives.  I don't think Linux cares much about fragmentation.
> 
> I could be wrong, though.
> 
> 

Reply via email to