> Hi Steve
> Actually fibmap is only working on regular files. (So the directories
> are just
> counted for fun.) Hardlinks are treated as regular files, symlinks are
> not followed.
>
> But you say, xfs_db frag found a fragment value of 0.02 % that is 0.9998
> in my way of counting
> which is rounded to 1.000. I changed fibmaps final output to show 6
> digits.
> Please, give it another try
> http://www.informatik.uni-frankfurt.de/~loizides/reiserfs/
Hmm, I think you changed the -v output, not the summary, I made my own change
and got this output:
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. 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. 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?
Steve
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
>
> Constantin
|