<HTML>
<HEAD>
<TITLE>Re: fragmentation question</TITLE>
</HEAD>
<BODY>
<FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'>thanks guys for the feedback.<BR>
iostat shows balanced io between two filesystems.<BR>
testing with RHEL 54, no issues there. seems to be happening on RHEL 55 only.<BR>
I do not have the latest 55 kernel. I'm going to upgrade to the latest 55 kernel and rerun the test.<BR>
<BR>
<BR>
<BR>
On 9/9/10 7:12 AM, &quot;Eric Sandeen&quot; &lt;<a href="sandeen@sandeen.net">sandeen@sandeen.net</a>&gt; wrote:<BR>
<BR>
</SPAN></FONT><BLOCKQUOTE><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'>Brady Chang wrote:<BR>
&gt; Hello All,<BR>
&gt; I have an issue with fragmentation on a particular device<BR>
&gt; thanks for any advice.<BR>
&gt;<BR>
&gt; -Brady<BR>
&gt;<BR>
&gt; I have a Dell r510 with 12 disks<BR>
&gt; 2xraid 5 (6 disks each)<BR>
&gt; raid group1:<BR>
&gt; 48 GB &nbsp;&nbsp;carved out for os mounted as /<BR>
&gt; remaining space &nbsp;2.7 TB for xfs mounted as /data1<BR>
&gt; raid group2:<BR>
&gt; 48 GB &nbsp;for swap<BR>
&gt; remaining space 2.7 TB for xfs mounted as /data2<BR>
&gt;<BR>
&gt; The strange thing is that /data1 never gets fragmented where as /data2<BR>
&gt; is badly fragmented.<BR>
&gt; I believe increase allocsize would help, but not sure how to explain why<BR>
&gt; /data2(/dev/sdd) always gets fragmented and not /data1(/dev/sdb)<BR>
&gt;<BR>
&gt; It's a data warehouse application. &nbsp;the I/O is balanced between /data1<BR>
&gt; and /data2:<BR>
&gt; output of xfs_db<BR>
&gt; [root@sdw4 data1]# xfs_db -c frag -r /dev/sdb<BR>
&gt; actual 14353, ideal 13702, fragmentation factor 4.54%<BR>
&gt; [root@sdw4 data1]# xfs_db -c frag -r /dev/sdd<BR>
&gt; actual 408674, ideal 13719, fragmentation factor 96.64%<BR>
<BR>
so each file has 30 extents on average (actual/ideal)<BR>
<BR>
&gt; df output<BR>
&gt; /dev/sdb &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;2.7T &nbsp;967G &nbsp;1.8T &nbsp;36% /data1<BR>
&gt; /dev/sdd &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;2.7T &nbsp;1.1T &nbsp;1.7T &nbsp;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>
&gt; LABEL=/data1 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/data1 &nbsp;&nbsp;&nbsp;&nbsp;xfs<BR>
&gt; &nbsp;&nbsp;&nbsp;&nbsp;allocsize=1048576,logbufs=8,noatime,nodiratime 0 0<BR>
&gt; LABEL=/data2 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/data2 &nbsp;&nbsp;&nbsp;&nbsp;xfs<BR>
&gt; &nbsp;&nbsp;&nbsp;&nbsp;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>
&gt; 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>