xfs
[Top] [All Lists]

Re: XFS/Postgres/Fragmentation

To: "Benito A. Venegas" <bvenegas@xxxxxxxxxxxxxx>, linux-xfs@xxxxxxxxxxx
Subject: Re: XFS/Postgres/Fragmentation
From: "Net Llama!" <netllama@xxxxxxxxxxxxx>
Date: Sun, 31 Oct 2004 19:09:21 -0800
In-reply-to: <Pine.LNX.4.44.0410312120010.1786-100000@xxxxxxxxxxxxxxxxxxxxx>
Organization: HAL V
References: <Pine.LNX.4.44.0410312120010.1786-100000@xxxxxxxxxxxxxxxxxxxxx>
Sender: linux-xfs-bounce@xxxxxxxxxxx
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8a5) Gecko/20041003
On 10/31/2004 06:44 PM, Benito A. Venegas wrote:
Hi people,

Thanks to everybody for your great effort day by day to maintain this great project...

Now..my problem.. :(

I'm experiencing some high fragmentations in one of my boxes, running postgresql database.

Last Friday/Saturday I ran some extra maintenance to my postgres DB (reindexing, analyze, vacuum full, etc.) due suddenly we started to have very slow performance in our queries. This maintenance helped, but later I ran xfs_db -r <partition> -c "frag -f" and the fragmentation was still high (close to 90%) and xfs_fsr reduced it to 7% after to complete 10 loops for all my file systems in /etc/mtab.

Today in the evening I took some statistics and fragmentations level was 64% !! :(

#xfs_db -r /dev/sdc1 -c "frag -f"
actual 2531, ideal 906, fragmentation factor 64.20%


Basic info:

-kernel 2.4.19 + xfs 1.2 + some extra patches -postgres 7.2.3-1PGDG

Wow, those are some truly ancient versions of both the kernel and postgresql.


#xfs_info /proj

meta-data=/proj isize=256 agcount=34, agsize=262144 blks
data     =                       bsize=4096   blocks=8885945, imaxpct=25
         =                       sunit=0      swidth=0 blks, unwritten=0
naming   =version 2              bsize=4096
log      =internal               bsize=4096   blocks=1200 version=1
         =                       sunit=0 blks
realtime =none                   extsz=65536  blocks=0, rtextents=0

-HW level
 PE2650 PIII 1400 Mhz Dual CPU, 1Gb ram,
/proj is in RAID1 using Perc3/Di (Yes, I know this is a bad raid card, but IMHO this is not causing the fragmentations)
 Only postgres and a small mysql DB are using this partition.


Qs:
-Can I ran xfs_fsr daily instead weekly?

-DO you think if I update my kernel and recreate my partition, using version 2 (or 3) I can mitigate my fragmentation level? (Risky task)

-Is really postgres the frag killer here (if any one of you is running postgres and only the data is one paritition..)

I'm running postgresql 7.3.x and 7.4.x on several boxes with XFS using 2.4.x and 2.6.x kernels and i'm not seeing fragmentation at anything even remotely close to what you're reporting. The worst of my boxes is under 10%, and most are under 5%.

--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
L. Friedman                                    netllama@xxxxxxxxxxxxx
Linux Step-by-step & TyGeMo:                    http://netllama.ipfox.com

 19:05:00 up 63 days,  9:43,  1 user,  load average: 1.36, 1.28, 1.16


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