Re: Question on Fragmentations

From: Peter Koczan <pjkoczan(at)gmail(dot)com>
To: Michael Monnerie <michael(dot)monnerie(at)it-management(dot)at>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: Question on Fragmentations
Date: 2007-02-09 23:20:28
Message-ID: 45CD01BC.7020305@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Michael Monnerie wrote:
> On Freitag, 9. Februar 2007 04:08 Peter Koczan wrote:
>
>> Case in point, I use xfs as the filesystem running under postgres,
>> and after a few days the "major" database clusters showed ~90%
>> fragmentation on their respective partitions (which is about a 10 to
>> 1 ratio of file fragments to files). After running a defragmenter
>>
>
> Does xfs have such stats, and defragmenter included? It could be a good
> idea for me to use that, then. Currently I use reiserfs.
>
> mfg zmi
>
xfs comes with It does have built-in, xfs-approved utilities for stats
and defragmenting built-in.

xfs_db gives stats (for fragmentation use xfs_db -c frag -r /dev/XXX).
This works even if the filesystem is mounted and active, but I believe
that old stats are cached until said filesystem is remounted or until
some stat collection process runs.

xfs_fsr is the defragmenter (simply use xfs_fsr /dev/XXX). It's safe to
run this on an active filesystem/database partition, because it throws
away the fragmented data if files are changed. So, for full
defragmentation, you'll either want to run it offline, unmounted, or
during idle times.

Peter

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Eduardo J. Ortega 2007-02-10 00:51:11 online tape backup
Previous Message GABRIEL COLINA 2007-02-09 23:10:20 Re: [pgsql-es-ayuda] tabla pg_user Ayuda......