pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter Koczan <pjkoczan@gmail.com>
To: Michael Monnerie <michael.monnerie@it-management.at>
Cc: pgsql-admin@postgresql.org
Subject: Re: Question on Fragmentations
Date: Fri, 09 Feb 2007 17:20:28 -0600
Message-ID: <45CD01BC.7020305@gmail.com> (raw)
In-Reply-To: <200702092251.21883@zmi.at>
References: <82e1a9bd0702072149q366a4632hb852ffe41fd2c65c@mail.gmail.com>
	<45CBE593.4020607@gmail.com>
	<200702092251.21883@zmi.at>

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





view thread (6+ messages)

Message-ID: <45CD01BC.7020305@gmail.com>
Permalink:  ../45CD01BC.7020305@gmail.com/
Also on:    postgresql.org/message-id/45CD01BC.7020305@gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: pjkoczan@gmail.com, michael.monnerie@it-management.at
  Subject: Re: Question on Fragmentations
  In-Reply-To: <45CD01BC.7020305@gmail.com>
  References: <82e1a9bd0702072149q366a4632hb852ffe41fd2c65c@mail.gmail.com> <45CBE593.4020607@gmail.com> <200702092251.21883@zmi.at> <45CD01BC.7020305@gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox