<HTML>
<HEAD>
<TITLE>Re: fragmentation question</TITLE>
</HEAD>
<BODY>
<FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'>xfs_info output after the TPC-H runs are the same.<BR>
<BR>
[root@sdw9 data1]# xfs_info /dev/sdd<BR>
meta-data=/dev/sdd isize=256 agcount=32, agsize=22469715 blks<BR>
= sectsz=512 attr=0<BR>
data = bsize=4096 blocks=719030880, imaxpct=25<BR>
= sunit=0 swidth=0 blks, unwritten=1<BR>
naming =version 2 bsize=4096 <BR>
log =internal bsize=4096 blocks=32768, version=1<BR>
= sectsz=512 sunit=0 blks, lazy-count=0<BR>
realtime =none extsz=4096 blocks=0, rtextents=0<BR>
[root@sdw9 data1]# xfs_info /dev/sdb<BR>
meta-data=/dev/sdb isize=256 agcount=32, agsize=22469715 blks<BR>
= sectsz=512 attr=0<BR>
data = bsize=4096 blocks=719030880, imaxpct=25<BR>
= sunit=0 swidth=0 blks, unwritten=1<BR>
naming =version 2 bsize=4096 <BR>
log =internal bsize=4096 blocks=32768, version=1<BR>
= sectsz=512 sunit=0 blks, lazy-count=0<BR>
realtime =none extsz=4096 blocks=0, rtextents=0<BR>
<BR>
[root@sdw9 data1]# xfs_db -c frag -r /dev/sdb<BR>
actual 1799, ideal 1748, fragmentation factor 2.83%<BR>
[root@sdw9 data1]# xfs_db -c frag -r /dev/sdd<BR>
actual 54324, ideal 1749, fragmentation factor 96.78%<BR>
<BR>
<BR>
On 9/9/10 7:12 AM, "Eric Sandeen" <<a href="sandeen@sandeen.net">sandeen@sandeen.net</a>> wrote:<BR>
<BR>
</SPAN></FONT><BLOCKQUOTE><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'>Brady Chang wrote:<BR>
> Hello All,<BR>
> I have an issue with fragmentation on a particular device<BR>
> thanks for any advice.<BR>
><BR>
> -Brady<BR>
><BR>
> I have a Dell r510 with 12 disks<BR>
> 2xraid 5 (6 disks each)<BR>
> raid group1:<BR>
> 48 GB carved out for os mounted as /<BR>
> remaining space 2.7 TB for xfs mounted as /data1<BR>
> raid group2:<BR>
> 48 GB for swap<BR>
> remaining space 2.7 TB for xfs mounted as /data2<BR>
><BR>
> The strange thing is that /data1 never gets fragmented where as /data2<BR>
> is badly fragmented.<BR>
> I believe increase allocsize would help, but not sure how to explain why<BR>
> /data2(/dev/sdd) always gets fragmented and not /data1(/dev/sdb)<BR>
><BR>
> It's a data warehouse application. the I/O is balanced between /data1<BR>
> and /data2:<BR>
> output of xfs_db<BR>
> [root@sdw4 data1]# xfs_db -c frag -r /dev/sdb<BR>
> actual 14353, ideal 13702, fragmentation factor 4.54%<BR>
> [root@sdw4 data1]# xfs_db -c frag -r /dev/sdd<BR>
> actual 408674, ideal 13719, fragmentation factor 96.64%<BR>
<BR>
so each file has 30 extents on average (actual/ideal)<BR>
<BR>
> df output<BR>
> /dev/sdb 2.7T 967G 1.8T 36% /data1<BR>
> /dev/sdd 2.7T 1.1T 1.7T 39% /data2<BR>
<BR>
1.1T/408674 extents is ~3M per extent, not so good.<BR>
<BR>
How many files are on each fs?<BR>
<BR>
> LABEL=/data1 /data1 xfs<BR>
> allocsize=1048576,logbufs=8,noatime,nodiratime 0 0<BR>
> LABEL=/data2 /data2 xfs<BR>
> allocsize=1048576,logbufs=8,noatime,nodiratime 0 0<BR>
<BR>
Everything but the first option is default, BTW.<BR>
<BR>
Is xfs_info output on the 2 filesystems the same?<BR>
<BR>
Otherwise Emmanuel's idea is a good one, maybe it's not<BR>
as balanced as you think it is, or maybe they have aged<BR>
differently and have different amounts of freespace<BR>
(see the freesp command in xfs_db)<BR>
<BR>
> By the way, the os is RHEL 5.5 kernel 2.6.18-194.11.1.el5<BR>
<BR>
Was Red Hat support not helpful?<BR>
<BR>
-Eric<BR>
<BR>
<BR>
</SPAN></FONT></BLOCKQUOTE>
</BODY>
</HTML>