From: Alexander Tsvetkov <alexander.tsvetkov@oracle.com>
To: Eric Sandeen <sandeen@sandeen.net>, Dave Chinner <david@fromorbit.com>
Cc: xfs@oss.sgi.com
Subject: Re: maxpct option for small xfs filesystems
Date: Wed, 28 Jan 2015 13:41:48 +0300 [thread overview]
Message-ID: <54C8BCEC.5050101@oracle.com> (raw)
In-Reply-To: <54C7BD60.5000104@sandeen.net>
On 01/27/2015 07:31 PM, Eric Sandeen wrote:
> On 1/27/15 10:23 AM, Alexander Tsvetkov wrote:
>
> ...
>
>> I have not the same results, just installed 3.19-rc6 and repeated the test.,
>> df -i reports 640 inodes for filesystem, but actually created 40512 files:
>>
>> [root@fedora ~]# mkfs.xfs -f -d size=16m -i maxpct=1 /dev/sdb2
>> 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 log bsize=4096 blocks=853, version=2
>> = sectsz=512 sunit=0 blks, lazy-count=1
>> realtime =none extsz=4096 blocks=0, rtextents=0
>> [root@fedora ~]# mount /dev/sdb2 /mnt/scratch/
>> fill with files until enospc...
>> [root@fedora ~]# df -i /mnt/scratch/
>> Filesystem Inodes IUsed IFree IUse% Mounted on
>> /dev/sdb2 640 640 0 100% /mnt/scratch
>> [root@fedora ~]# df -Th /mnt/scratch/
>> Filesystem Type Size Used Avail Use% Mounted on
>> /dev/sdb2 xfs 13M 13M 156K 99% /mnt/scratch
>> [root@fedora ~]# umount /mnt/scratch
>> [root@fedora ~]# xfs_db -c "blockget -n" -c "ncheck" /dev/sdb2 | wc -l
>> 40512
> and what does df -i say after remount?
Nothing changed after remount:
[root@fedora ~]# xfs_db -c "blockget -n" -c "ncheck" /dev/sdb2 | wc -l
40512
[root@fedora ~]# mount /dev/sdb2 /mnt/scratch/
[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, lazy-count=1
realtime =none extsz=4096 blocks=0, rtextents=0
[root@fedora ~]# df -i /mnt/scratch/
Filesystem Inodes IUsed IFree IUse% Mounted on
/dev/sdb2 640 640 0 100% /mnt/scratch
[root@fedora ~]# umount /mnt/scratch
[root@fedora ~]# xfs_db -c "blockget -n" -c "ncheck" /dev/sdb2 | wc -l
40512
[root@fedora ~]# mount /dev/sdb2 /mnt/scratch/
[root@fedora ~]# df -i /mnt/scratch/
Filesystem Inodes IUsed IFree IUse% Mounted on
/dev/sdb2 640 640 0 100% /mnt/scratch
[root@fedora ~]# mount -o remount /dev/sdb2 /mnt/scratch/
[root@fedora ~]# df -i /mnt/scratch/
Filesystem Inodes IUsed IFree IUse% Mounted on
/dev/sdb2 640 640 0 100% /mnt/scratch
[root@fedora ~]# umount /mnt/scratch
[root@fedora ~]# xfs_db -c "blockget -n" -c "ncheck" /dev/sdb2 | wc -l
40512
>
> This is actually a problem with the lazy superblock counters I've run into before,
> but haven't yet fixed. This kind of workload is such that it never trips the
> runtime rebalancing.
>
>> Looking into ncheck output there are 40512 pairs reported in the output each with own unique
>> inode number. ncheck doesn't report inodes count by definition, but what does these
>> 40512 reported inode numbers mean if only actually 640 inodes were allocated? From another hand
>> each new file should have associated meta-data in the corresponding allocated inode structure, so for
>> 40512 newly created files I expect the same count of allocated inodes, is it correct?
> Recheck df -i after remount, I think you will see many more than 640.
Do you mean that ncheck reports right number of allocated inodes instead
of df -i? If counters are incorrect then the
maxpct limit is not working as well, because there are much more of
filesystem space allocated for inodes then defined limit 1%.
What is expected behaviour in this case when it's required for fs to
allocate new inodes starting to exceed defined maxpct
percentage? Which error is expected to be returned to user, enospc or
probably just some warning?
>
> -Eric
Thanks,
Alexander Tsvetkov
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next prev parent reply other threads:[~2015-01-28 10:41 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2015-01-28 15:44 ` Eric Sandeen
2015-01-28 18:05 ` Eric Sandeen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=54C8BCEC.5050101@oracle.com \
--to=alexander.tsvetkov@oracle.com \
--cc=david@fromorbit.com \
--cc=sandeen@sandeen.net \
--cc=xfs@oss.sgi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.