From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from cuda.sgi.com (cuda3.sgi.com [192.48.176.15]) by oss.sgi.com (8.14.3/8.14.3/SuSE Linux 0.8) with ESMTP id o89LuAW0119081 for ; Thu, 9 Sep 2010 16:56:10 -0500 Received: from EXHUB018-4.exch018.msoutlookonline.net (localhost [127.0.0.1]) by cuda.sgi.com (Spam Firewall) with ESMTP id 7A1A51E61F47 for ; Thu, 9 Sep 2010 14:56:54 -0700 (PDT) Received: from EXHUB018-4.exch018.msoutlookonline.net (exhub018-4.exch018.msoutlookonline.net [64.78.17.19]) by cuda.sgi.com with ESMTP id PivX4fRvke9UYq8M for ; Thu, 09 Sep 2010 14:56:54 -0700 (PDT) From: Brady Chang Date: Thu, 9 Sep 2010 14:59:47 -0700 Subject: Re: fragmentation question Message-ID: In-Reply-To: <4C88EB62.5060000@sandeen.net> Content-Language: en MIME-Version: 1.0 List-Id: XFS Filesystem from SGI List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============2573671831867914319==" Sender: xfs-bounces@oss.sgi.com Errors-To: xfs-bounces@oss.sgi.com To: Eric Sandeen Cc: "xfs@oss.sgi.com" --===============2573671831867914319== Content-Language: en Content-Type: multipart/alternative; boundary="_000_C8AEA6E36E2Ebchanggreenplumcom_" --_000_C8AEA6E36E2Ebchanggreenplumcom_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable thanks guys for the feedback. iostat shows balanced io between two filesystems. testing with RHEL 54, no issues there. seems to be happening on RHEL 55 onl= y. I do not have the latest 55 kernel. I'm going to upgrade to the latest 55 k= ernel and rerun the test. On 9/9/10 7:12 AM, "Eric Sandeen" wrote: Brady Chang wrote: > Hello All, > I have an issue with fragmentation on a particular device > thanks for any advice. > > -Brady > > I have a Dell r510 with 12 disks > 2xraid 5 (6 disks each) > raid group1: > 48 GB carved out for os mounted as / > remaining space 2.7 TB for xfs mounted as /data1 > raid group2: > 48 GB for swap > remaining space 2.7 TB for xfs mounted as /data2 > > The strange thing is that /data1 never gets fragmented where as /data2 > is badly fragmented. > I believe increase allocsize would help, but not sure how to explain why > /data2(/dev/sdd) always gets fragmented and not /data1(/dev/sdb) > > It's a data warehouse application. the I/O is balanced between /data1 > and /data2: > output of xfs_db > [root@sdw4 data1]# xfs_db -c frag -r /dev/sdb > actual 14353, ideal 13702, fragmentation factor 4.54% > [root@sdw4 data1]# xfs_db -c frag -r /dev/sdd > actual 408674, ideal 13719, fragmentation factor 96.64% so each file has 30 extents on average (actual/ideal) > df output > /dev/sdb 2.7T 967G 1.8T 36% /data1 > /dev/sdd 2.7T 1.1T 1.7T 39% /data2 1.1T/408674 extents is ~3M per extent, not so good. How many files are on each fs? > LABEL=3D/data1 /data1 xfs > allocsize=3D1048576,logbufs=3D8,noatime,nodiratime 0 0 > LABEL=3D/data2 /data2 xfs > allocsize=3D1048576,logbufs=3D8,noatime,nodiratime 0 0 Everything but the first option is default, BTW. Is xfs_info output on the 2 filesystems the same? Otherwise Emmanuel's idea is a good one, maybe it's not as balanced as you think it is, or maybe they have aged differently and have different amounts of freespace (see the freesp command in xfs_db) > By the way, the os is RHEL 5.5 kernel 2.6.18-194.11.1.el5 Was Red Hat support not helpful? -Eric --_000_C8AEA6E36E2Ebchanggreenplumcom_ Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Re: fragmentation question thanks guys for the feedback.
iostat shows balanced io between two filesystems.
testing with RHEL 54, no issues there. seems to be happening on RHEL 55 onl= y.
I do not have the latest 55 kernel. I'm going to upgrade to the latest 55 k= ernel and rerun the test.



On 9/9/10 7:12 AM, "Eric Sandeen" <sandeen@sandeen.net> wrote:

Brady Chang wrote:
> Hello All,
> I have an issue with fragmentation on a particular device
> thanks for any advice.
>
> -Brady
>
> I have a Dell r510 with 12 disks
> 2xraid 5 (6 disks each)
> raid group1:
> 48 GB   carved out for os mounted as /
> remaining space  2.7 TB for xfs mounted as /data1
> raid group2:
> 48 GB  for swap
> remaining space 2.7 TB for xfs mounted as /data2
>
> The strange thing is that /data1 never gets fragmented where as /data2=
> is badly fragmented.
> I believe increase allocsize would help, but not sure how to explain w= hy
> /data2(/dev/sdd) always gets fragmented and not /data1(/dev/sdb)
>
> It's a data warehouse application.  the I/O is balanced between /= data1
> and /data2:
> output of xfs_db
> [root@sdw4 data1]# xfs_db -c frag -r /dev/sdb
> actual 14353, ideal 13702, fragmentation factor 4.54%
> [root@sdw4 data1]# xfs_db -c frag -r /dev/sdd
> actual 408674, ideal 13719, fragmentation factor 96.64%

so each file has 30 extents on average (actual/ideal)

> df output
> /dev/sdb           &= nbsp;  2.7T  967G  1.8T  36% /data1
> /dev/sdd           &= nbsp;  2.7T  1.1T  1.7T  39% /data2

1.1T/408674 extents is ~3M per extent, not so good.

How many files are on each fs?

> LABEL=3D/data1        /data1  =    xfs
>     allocsize=3D1048576,logbufs=3D8,noatime,nodira= time 0 0
> LABEL=3D/data2        /data2  =    xfs
>     allocsize=3D1048576,logbufs=3D8,noatime,nodira= time 0 0

Everything but the first option is default, BTW.

Is xfs_info output on the 2 filesystems the same?

Otherwise Emmanuel's idea is a good one, maybe it's not
as balanced as you think it is, or maybe they have aged
differently and have different amounts of freespace
(see the freesp command in xfs_db)

> By the way, the os is RHEL 5.5 kernel 2.6.18-194.11.1.el5

Was Red Hat support not helpful?

-Eric


--_000_C8AEA6E36E2Ebchanggreenplumcom_-- --===============2573671831867914319== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ xfs mailing list xfs@oss.sgi.com http://oss.sgi.com/mailman/listinfo/xfs --===============2573671831867914319==--