[Top] [All Lists]

Re: bad performance on touch/cp file on XFS system

To: Dave Chinner <david@xxxxxxxxxxxxx>
Subject: Re: bad performance on touch/cp file on XFS system
From: Zhang Qiang <zhangqiang.buaa@xxxxxxxxx>
Date: Mon, 25 Aug 2014 18:31:10 +0800
Cc: xfs@xxxxxxxxxxx
Delivered-to: xfs@xxxxxxxxxxx
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=1Znqku2513v6PmO/svCBtpVBGqt5TEwfZfyCcpwTp18=; b=AqgM7n/b9GKVBn2f2W04cG713KgIdLobgvMkonaupPRnRaQXraqIbkjwJ6SxDDi2N2 HCwxKBbuxkRESqWSZEOqyyjRgRZZXWFW0b1LtNIN38mH/6rpMHqAWrH3W1M8kLSbGyJb uCouMZKNauEb24jIDMt7+Uruv9JBPR753/+kzSeTUcKtJDNFEn3VoqTALdzyiCE64s/c zHsKBUQ5MLMmNF11uzBrwPMKkkFkTH0MEsOQtteVWnL6ooJyYUHgbTSObf4dKYmpjfsw 2Pwkf+KAeOYtZmwvNy7T97UyICmPtiJyEcBnIzvGWyMWsuyh4jybqtzUxYnQzTGPJD0U fiBw==
In-reply-to: <20140825090843.GE20518@dastard>
References: <CAKEtwsWxZseS8M+O7vSR2FRXr4gjVQ0RDO8ok+jMPWq-8jPEeA@xxxxxxxxxxxxxx> <20140825051801.GY26465@dastard> <CAKEtwsXiVKTWAW+YszjNnFnD4_Ld7g2qXEvw48A-SitYSGyXHA@xxxxxxxxxxxxxx> <20140825090843.GE20518@dastard>

2014-08-25 17:08 GMT+08:00 Dave Chinner <david@xxxxxxxxxxxxx>:
On Mon, Aug 25, 2014 at 04:47:39PM +0800, Zhang Qiang wrote:
> I have checked icount and ifree, but I found there are about 11.8 percent
> free, so the free inode should not be too few.
> Here's the detail log, any new clue?
> # mount /dev/sda4 /data1/
> # xfs_info /data1/
> meta-data="" Â Â Â Â Â Â isize=256Â Â agcount=4, agsize=142272384

4 AGs

> icount = 220619904
> ifree = 26202919

And 220 million inodes. There's your problem - that's an average
of 55 million inodes per AGI btree assuming you are using inode64.
If you are using inode32, then the inodes will be in 2 btrees, or
maybe even only one.
You are right, all inodes stay on one AG.

BTW, why i allocate 4 AGs, and all inodes stay in one AG for inode32?, sorry as I am not familiar with xfs currently.

Anyway you look at it, searching btrees with tens of millions of
entries is going to consume a *lot* of CPU time. So, really, the
state your fs is in is probably unfixable without mkfs. And really,
that's probably pushing the boundaries of what xfsdump and
xfs-restore can support - it's going to take a long tiem to dump and
restore that data....
ÂThanks reasonable.

With that many inodes, I'd be considering moving to 32 or 64 AGs to
keep the btree size down to a more manageable size. The free inodeÂ
btree would also help, but, really, 220M inodes in a 2TB filesystem
is really pushing the boundaries of sanity.....
So the better inodes size in one AG is about 5M, is there any documents about these options I can learn more?

I will spend more time to learn how to use xfs, and the internal of xfs, and try to contribute code.

Thanks for your help.


Dave Chinner

xfs mailing list

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