Jan Derfinak wrote:
> Hi.
>
> I would like to ask how much space needs xfs for empty files?
> I tested fix for bug #284. Good work, it works for me.
> But I created file system on loop device with size 512MB and ran bonnie++:
>
> # mkfs.xfs /dev/loop0
> meta-data=/dev/loop0 isize=256 agcount=8, agsize=16384 blks
> = sectsz=512
> data = bsize=4096 blocks=131072, imaxpct=25
> = sunit=0 swidth=0 blks, unwritten=1
> naming =version 2 bsize=4096
> log =internal log bsize=4096 blocks=1200, version=1
> = sectsz=512 sunit=0 blks
> realtime =none extsz=65536 blocks=0, rtextents=0
>
> /tmp/bonnie++-1.02c/bonnie++ -d /mnt/mnt2 -u 0:0 -s 0 -n 500
>
> Everything was fine, maximum alocated space was 29%:
>
> /dev/loop0 519488 148032 371456 29% /mnt/mnt2
>
> Then I created 500MB FS and I used modified bonnie according bug #284
> comment #9.
>
> # mkfs.xfs /dev/loop0
> meta-data=/dev/loop0 isize=256 agcount=8, agsize=16000 blks
> = sectsz=512
> data = bsize=4096 blocks=128000, imaxpct=25
^^^^^^^^
This is why you ran out of space, imaxpct is saying that 25% of the
filesystem can be consumed by inodes. The invocation of bonnie++
creates half a million files. You can change this with mkfs options
or with xfs_growfs. Your second filesystem was smaller, 25% of 128000
blocks is 32000 which is 512000 inodes. Looks like the calculation
was slightly off, but basically correct.
Steve
|