From: Craig James <craig_james@emolecules.com>
To: Matthew Wakeling <matthew@flymine.org>
Cc: pgsql-performance@postgresql.org <pgsql-performance@postgresql.org>
Subject: Re: which ext3 fs type should I use for postgresql
Date: Thu, 15 May 2008 07:57:01 -0700
Message-ID: <482C4F3D.6010808@emolecules.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0805151217490.16756@aragorn.flymine.org>
References: <1210846262.16664.41.camel@philippe-desktop>
<Pine.LNX.4.64.0805151217490.16756@aragorn.flymine.org>
Matthew Wakeling wrote:
> Probably of more use are some of the other settings:
>
> -m reserved-blocks-percentage - this reserves a portion of the filesystem
> that only root can write to. If root has no need for it, you can kill
> this by setting it to zero. The default is for 5% of the disc to be
> wasted.
This is not a good idea. The 5% is NOT reserved for root's use, but rather is to prevent severe file fragmentation. As the disk gets full, the remaining empty spaces tend to be small spaces scattered all over the disk, meaning that even for modest-sized files, the kernel can't allocate contiguous disk blocks. If you reduce this restriction to 0%, you are virtually guaranteed poor performance when you fill up your disk, since those files that are allocated last will be massively fragmented.
Worse, the fragmented files that you create remain fragmented even if you clean up to get back below the 95% mark. If Postgres happened to insert a lot of data on a 99% full file system, those blocks could be spread all over the place, and they'd stay that way forever, even after you cleared some space.
Craig
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 using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: craig_james@emolecules.com, matthew@flymine.org
Subject: Re: which ext3 fs type should I use for postgresql
In-Reply-To: <482C4F3D.6010808@emolecules.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