[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Why ext3 doesn't need defragmentation ?



Alvin Oga wrote:
> hi ya
>
>> David Brodbeck wrote:
>>
>> On Nov 30, 2007, at 9:45 AM, Stefan Monnier wrote:
>>> No.  The NTFS file system does not need defragmentation.
>
> all file systems can use a defragmentor
>
> lets assume a disk format of:
>
> 1 2 3 4 5 6 7 8 9 10 ...... 63    ( aka sectors )
>
> if you try to read/write a file starting sector 1 into your disk buffer,
> you may or may not have disk buffer space left to read another 512Byte
> from sector 2...
>
> if you wait a bit, few milliseconds for the system to services its
> disk interrupts, you now have disk buffer space to read sector 2 ..
>
> but since you waited too long, sector 2 came and went, so now you have
> to wait for a whole revolution before you can read sector 2
>
> ----
>
> if you format using, than you may or may not have time to read sector 2
>
> 1 11 21 31 41 51 61 2 12 22 32 42 52 62 3 13 23 33 43 53 63 4 14...
>
> the defragmentor can be used to move sectors around to optimize
> reading the whole file w/o waiting for the next revolution
>
> 	- how the defragmentor displays used and unused sectors
> 	can make a big difference in the pretty pic you see vs the
> 	actual performance
>
> what you see the defragmentor showing would be a continuously
> allocated file instead of scattered across various sectors
> within a track or having to move the heads to a different tract
> to get to the next 512byte
>
> there's only 512bytes per sector
> 63 sectors per track
> and any number of cylinders depending on your disk size
>
> the number of heads and disk buffer size would depend on your
> disk drive manufacturer and model#
>
> one traack is 512MB * 62 == 31.744KBytes
> with 16 physical heads .... you can read 509.904KBytes per revolution
>
> all un-used disk sectors belonging to a different file is read and
> discarded ... what a waste
>
> with 8MB or 16MB disk buffer .. you can read lots of tracks before
> the disk buffer is full ...  there should NOT be a "slow" system
>
> lba ...
> maps all the cylinder/heads/sector into other whacky numbers ( lba blocks )
>
> c ya
> alvin
>
>


Great info thank you!

Sam



Reply to: