Thread: picking a filesystem

picking a filesystem

From
Robert Haas
Date:
On Wed, May 25, 2011 at 4:41 PM, Greg Smith <greg@2ndquadrant.com> wrote:
> On 05/23/2011 06:16 PM, John Rouillard wrote:
>>
>> OS: centos 5.5
>> Filesystem: data - ext4 (note 4 not 3); 6.6T formatted
>>             wal  - ext4; 1.5T formatted
>> Raid: data - level 10, 8 disk wd2003; controller LSI MegaRAID SAS 9260-4i
>>       wal  - level 1,  2 disk wd2003; controller LSI MegaRAID SAS 9260-4i
>>
>> Could it be an ext4 issue? It seems that ext4 may still be at the
>> bleeding edge for postgres use.
>>
>
> I would not trust ext4 on CentOS 5.5 at all.  ext4 support in 5.5 is labeled
> by RedHat as being in "Technology Preview" state.  I believe that if you had
> a real RedHat system instead of CentOS kernel, you'd discover it's hard to
> even get it installed--you need to basically say "yes, I know it's not for
> production, I want it anyway" to get preview packages.  It's not really
> intended for production use.
>
> What I'm hearing from people is that they run into the occasional ext4 bug
> with PostgreSQL, but the serious ones aren't happening very often now, on
> systems running RHEL6 or Debian Squeeze.  Those kernels are way, way ahead
> of the ext4 backport in RHEL5 based systems, and they're just barely stable.

So if you're running a RHEL5.4 or RHEL5.5 system, are you basically
stuck with ext3?  I'm not sure if I'm remembering correctly, but ISTM
that you've been uncomfortable with BOTH ext4 and XFS prior to RHEL6;
but OK with both beginning with RHEL6.

Also, any tips on mount options for XFS/ext4/ext3?

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

Re: picking a filesystem

From
Shaun Thomas
Date:
On 05/31/2011 10:35 AM, Robert Haas wrote:

> So if you're running a RHEL5.4 or RHEL5.5 system, are you basically
> stuck with ext3?  I'm not sure if I'm remembering correctly, but ISTM
> that you've been uncomfortable with BOTH ext4 and XFS prior to RHEL6;
> but OK with both beginning with RHEL6.

We haven't had any problems (yet) running XFS on CentOS 5.5. Sure, it
doesn't have a lot of the recent kernel advances that made it faster,
but it out-performed our EXT3 filesystem in some cases by 40%.

> Also, any tips on mount options for XFS/ext4/ext3?

We got the best performance by increasing the agcount during formatting.
But we also used some of the advanced logging options. I set the size to
128m, enabled lazy-count to reduce logging overhead, and set version to
2 so we could use a bigger log buffer in the mount options. So:

mkfs.xfs -d agcount=256 -l size=128m,lazy-count=1,version=2

For mounting, aside from the usual noatime and nodiratime, we set the
allocsize to 256m to reduce fragmentation, maxed out the logbufs at 8,
and the logbsize to 256k to improve file deletion performance, and set
the attr2 option to better handle inodes. So:

mount -o allocsize=256m,logbufs=8,noatime,nodiratime,attr2,logbsize=256k

Maybe more recent XFS kernels have other options we're not aware of, but
we've had good luck with these so far.

--
Shaun Thomas
OptionsHouse | 141 W. Jackson Blvd. | Suite 800 | Chicago IL, 60604
312-676-8870
sthomas@peak6.com

______________________________________________

See  http://www.peak6.com/email_disclaimer.php
for terms and conditions related to this email

Re: picking a filesystem

From
Samuel Gendler
Date:


On Tue, May 31, 2011 at 8:35 AM, Robert Haas <robertmhaas@gmail.com> wrote:

So if you're running a RHEL5.4 or RHEL5.5 system, are you basically
stuck with ext3?  I'm not sure if I'm remembering correctly, but ISTM
that you've been uncomfortable with BOTH ext4 and XFS prior to RHEL6;
but OK with both beginning with RHEL6.

Also, any tips on mount options for XFS/ext4/ext3?

Greg's book has a whole chapter that goes through the pros and cons of each type of fs and offers suggestions for configuring most of them for postgres.  I haven't actually read the chapter in detail yet, so I won't try to summarize its content here. It appeared to be pretty comprehensive during my quick scan of the chapter