Disk defragmenter in Linux
Jim Cornette
fc-cornette at insight.rr.com
Fri Dec 30 04:43:00 UTC 2005
Mike McCarty wrote:
> Jim Cornette wrote:
>
>> John Summerfied wrote:
>>
>>> Jeff Vian wrote:
>>>
>>>>
>>>> Exactly, and IIRC the filesystem knows that if it needs X amount of
>>>> space for a file, then Y number of inodes are marked for use for that
>>>> file at the beginning. Thus space allocated is as contiguous as is
>>>> efficient for read/write on the disk.
>>>
>>>
>>>
>>>
>>> If "the filesystem knows that if it needs X amount of space for a
>>> file," that implies there's a way of telling it that.
>>>
>>> How's that done? I don't recall any system call for *x (there is one
>>> for OS/2), and one could do it in JCL in IBM's OS in the 60s), but
>>> in the *x world I've never seen a way to do it.
>>
>>
>>
>>
>> Since the discussions regarding fragmentation on ext3 filesystems was
>> pretty long running. I decided to try
>> filefrag /usr/bin/* |sort |grep 'would be'
>> and the output showed a lot of fragmentation. One of the files was up
>> to 45.
>
>
> On my system I did this...
>
> # filefrag /usr/bin/* | sort -k2 -nr | grep 'would be'
>
> Here're the first few entries...
>
> /usr/bin/emacs: 248 extents found, perfection would be 1 extent
> /usr/bin/emacs-21.3: 248 extents found, perfection would be 1 extent
> /usr/bin/kermit: 80 extents found, perfection would be 1 extent
> /usr/bin/kbabel: 45 extents found, perfection would be 1 extent
> /usr/bin/ddd: 45 extents found, perfection would be 1 extent
> /usr/bin/gthumb: 41 extents found, perfection would be 1 extent
> /usr/bin/gdbtui: 36 extents found, perfection would be 1 extent
> /usr/bin/elinks: 30 extents found, perfection would be 1 extent
> /usr/bin/iniomega: 22 extents found, perfection would be 1 extent
> /usr/bin/kpersonalizer: 21 extents found, perfection would be 1 extent
> /usr/bin/artsd: 21 extents found, perfection would be 1 extent
> /usr/bin/artscat: 20 extents found, perfection would be 1 extent
> /usr/bin/kiconedit: 19 extents found, perfection would be 1 extent
> /usr/bin/glade-2: 19 extents found, perfection would be 1 extent
> /usr/bin/karm: 18 extents found, perfection would be 1 extent
> /usr/bin/dia: 18 extents found, perfection would be 1 extent
> /usr/bin/designer3: 18 extents found, perfection would be 1 extent
> /usr/bin/designer: 18 extents found, perfection would be 1 extent
> /usr/bin/kppplogview: 16 extents found, perfection would be 1 extent
> /usr/bin/kfontinst: 16 extents found, perfection would be 1 extent
> /usr/bin/civclient-xaw: 15 extents found, perfection would be 1 extent
> /usr/bin/cdrecord: 15 extents found, perfection would be 1 extent
> /usr/bin/knewstickerstub: 14 extents found, perfection would be 1 ext
>
> Surely those who argue that ext3 does not get fragmented
> during install don't think that 248 extents is "not
> significant fragmentation".
>
> I assure you that I have done nothing on my system to try to
> fragment emacs.
>
> Mike
The fragmentation for your emacs is unbelievably high. I did not find
anything yet fragmented in the hundreds, let alone several hundred
extents. Are you using LVM? My system is setup in traditional
partitions. LVM usage "seemed" slower in responsiveness, so I assumed it
was more in fragments
Jim
More information about the users
mailing list