All of
 help / color / mirror / Atom feed
* maxpct option for small xfs filesystems
@ 2015-01-26 16:14 Alexander Tsvetkov
  2015-01-26 22:37 ` Dave Chinner
  0 siblings, 1 reply; 8+ messages in thread
From: Alexander Tsvetkov @ 2015-01-26 16:14 UTC (permalink / raw)
  To: xfs


I'm trying to understand the expected behaviour of "maxpct" option in 
case of small xfs filesystem
comparing the maximum percentage defined for this option with the 
percentage of actually allocated
inodes in filesystem, but the result of prepared test case doesn't 
correspond to the expectations:

[root@fedora ~]#mkfs.xfs -f -d size=16m -i maxpct=1 /dev/sdb2
[root@fedora ~]# mount /dev/sdb2 /mnt/scratch/
[root@fedora ~]# mount | grep scratch
/dev/sdb2 on /mnt/scratch type xfs 
[root@fedora ~]# xfs_info /mnt/scratch/
meta-data=/dev/sdb2        isize=256    agcount=1, agsize=4096 blks
                  =                       sectsz=512   attr=2, projid32bit=1
                  =                       crc=0        finobt=0
data          =                       bsize=4096   blocks=4096, imaxpct=1
                  =                       sunit=0      swidth=0 blks
naming     =version 2        bsize=4096   ascii-ci=0 ftype=0
log            =internal           bsize=4096   blocks=853, version=2
                  =                       sectsz=512   sunit=0 blks, 
realtime    =none               extsz=4096   blocks=0, rtextents=0

then trying to fill filesystem with lot of empty files until enospc 
obtained and break the loop:

[root@fedora ~]# for i in {0..100000}; do str=$(mktemp 
--tmpdir=/mnt/scratch tmp.XXXXXXXXXX); echo $str; done

filesystem is full with created files:

[root@fedora ~]# df -Th | grep scratch
/dev/sdb2      xfs        13M   13M  148K  99% /mnt/scratch

and from the number of actually created inodes:

[root@fedora ~]# xfs_db -c "blockget -n" -c "ncheck" /dev/sdb2 | wc -l

it's calculated the space allocated for file inodes 9.9Mb (40512*256b 
inode size) that is about 77% of filesystem
space instead of defined maximum with maxpct=1% or even default 25% value.

Alexander Tsvetkov

xfs mailing list

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2015-01-28 18:05 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-26 16:14 maxpct option for small xfs filesystems Alexander Tsvetkov
2015-01-26 22:37 ` Dave Chinner
2015-01-27 16:23   ` Alexander Tsvetkov
2015-01-27 16:31     ` Eric Sandeen
2015-01-27 19:15       ` Eric Sandeen
2015-01-28 10:41       ` Alexander Tsvetkov
2015-01-28 15:44         ` Eric Sandeen
2015-01-28 18:05         ` Eric Sandeen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.