xfs
[Top] [All Lists]

Re: Strage values from FIBMAP on holes or after end of file

To: Steve Lord <lord@xxxxxxx>
Subject: Re: Strage values from FIBMAP on holes or after end of file
From: Constantin Loizides <Constantin.Loizides@xxxxxx>
Date: Fri, 03 Aug 2001 19:23:53 +0200
Cc: xfs-list <linux-xfs@xxxxxxxxxxx>
Organization: Innovative Software AG
References: <200108031629.f73GT1k10663@jen.americas.sgi.com>
Sender: owner-linux-xfs@xxxxxxxxxxx
Hi Steve,

> [...]
> Hmm, I think you changed the -v output, not the summary, I made my own change
> and got this output:
Oh yes, how stupid I am *g*

> 
> Result for 48425 files 3044 dirs: Int: 0.873321 Ext: 1.000000 1.000000 
> 1.000000 1.000000 - 1.000162 - Path 1.000162 1.010155
> Mean Internal frag: 0.873321
> Mean External frag: 1.000000
> Mean Frag. Path 1.000162
> 
> If I read your web page correctly, internal fragmentation is basically
> saying that if your filesystem uses a fixed size unit of space to place
> files in and your files are not all a multiple of that size then you will
> get internal fragmentation.
Correct

> So basically if I had a 4K block filesystem
> and all my files were 2K long I would have an internal fragmentation
> of 50%. This is a measure of space efficiency of the filesystem, not
> really fragmentation.
That's called internal fragmentation in literature.
But you are right, it is not what you usually talk of when talking about
(external) fragmentation 
> Only filesystems which support tail packing, or
> use a really small block size will be able to get a really low number
> here when you use small files.
> 
> Is this a correct interpretation?
Perfectly! Think also about fragments of UFS. Same thing. These systems
try not to waste to much of space.

> p.s. I have an xfs filesystem which has existed for probably a year or so
> now, it is where I do all my kernel builds, merges with linus's trees, rpm
> building etc. I also frequently have multiple operations on going in parallel.
> It currently looks like this:
> 
> df /src
> Filesystem           1k-blocks      Used Available Use% Mounted on
> /dev/hda5              4194932   2439204   1755728  59% /src
> 
> df -i /src
> Filesystem            Inodes   IUsed   IFree IUse% Mounted on
> /dev/hda5            4200896  113588 4087308    3% /src
> 
> xfs_db: frag
> actual 109889, ideal 109553, fragmentation factor 0.31%
> xfs_db: freesp
>    from      to extents  blocks    pct
>       1       1     597     597   0.14
>       2       3     414     967   0.22
>       4       7     333    1762   0.40
>       8      15     279    3165   0.72
>      16      31     153    3458   0.79
>      32      63     148    6904   1.57
>      64     127     259   24360   5.55
>     128     255     290   52605  11.98
>     256     511     186   65816  14.99
>     512    1023      71   49383  11.25
>    1024    2047      14   19025   4.33
>    2048    4095       6   17071   3.89
>    4096    8191       8   50298  11.46
>    8192   16383       4   49448  11.27
>   16384   32767       1   21222   4.83
>   32768   65535       2   72851  16.60
> 
> ./fibmap /src
> Result for 106819 files 6584 dirs: Int: 0.891066 Ext: 0.999941 0.999942 
> 0.999954 0.999954 - 1.347378 - Path 1.495712 2.525242
> Mean Internal frag: 0.891066
> Mean External frag: 0.999941
> Mean Frag. Path 1.495712
I cant say much, as I dont know how xfs_db calculates these values.

But I am wondering about the internal frag. Thought xfs only can handel
4K blocks?
If your /src fs uses 4K blocks, then 0.89 e.g. 10 % is a very low value
of internal fragmentation.
If it uses 1K (as shown in the ooutput of df) then it is quite normal
compared to a 1K ext2 system.

Constantin


<Prev in Thread] Current Thread [Next in Thread>