xfs
[Top] [All Lists]

Re: Space calculation

To: Jan Derfinak <ja@xxxxxxxxxxxx>
Subject: Re: Space calculation
From: Steve Lord <lord@xxxxxxx>
Date: Fri, 19 Mar 2004 07:44:42 -0600
Cc: linux-xfs@xxxxxxxxxxx
In-reply-to: <Pine.LNX.4.58.0403182013170.1164@xxxxxxxxxxxxxxxxxx>
References: <Pine.LNX.4.58.0403182013170.1164@xxxxxxxxxxxxxxxxxx>
Sender: linux-xfs-bounce@xxxxxxxxxxx
User-agent: Mozilla Thunderbird 0.5 (X11/20040208)
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


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