[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Strage values from FIBMAP on holes or after end of file
>
> > 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 parall
> el.
> > 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.9
> 99954 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.
It is using 4K blocks, XFS is good at this stuff ;-). Actually, large
files will tend to reduce the fragmentation, i.e. a 399K file which
consumes 400K of disk space is not very fragmented by this measure,
so really this is a function of file size distribution.
> If it uses 1K (as shown in the ooutput of df) then it is quite normal
> compared to a 1K ext2 system.
Blocksize in df output is not a function of filesystem blocksize, it is
always reported in 1K chunks. Also be careful of st_blksize reported by
stat, it is the optimum size for doing I/O, not the filesystem block
size (not that you are using this right now).
Steve
>
> Constantin