pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Greg Smith <greg@2ndQuadrant.com>
To: pgsql-performance@postgresql.org
Subject: Re: What's the state of postgresql on ext4 now?
Date: Tue, 15 Nov 2011 22:48:07 -0500
Message-ID: <4EC33277.6000103@2ndQuadrant.com> (raw)
In-Reply-To: <1321264847.87776.YahooMailNeo@web160808.mail.bf1.yahoo.com>
References: <1321264847.87776.YahooMailNeo@web160808.mail.bf1.yahoo.com>

On 11/14/2011 05:00 AM, Alexandru wrote:
> I know there were a lot of performance issues with ext4, but i don't 
> know the state of it now.
> I have a private openstreetmap server installed on a ubuntu 11.10 
> 64bit pc with both partitions (/ and /home) formated with ext4. My 
> problem is that the server works very slow.

The only performance issue with ext4 is that it is careful to flush data 
to disk when the database asks it to.  That is slow on most hard drives, 
and it wasn't done correctly by ext3 on older Linux kernels.  So to many 
people this looked like a performance problem, when it was actually a 
reliability improvement as far as PostgreSQL is concerned.  The reliable 
behavior just takes longer.  See 
http://wiki.postgresql.org/wiki/Reliable_Writes for more information 
about why this is important.  Reports about ext4 being slower by sources 
like Phoronix were very misinformed about what was going on.

When you turn off the synchronous_commit parameter in the 
postgresql.conf, the database will stop asking the filesystem to ensure 
things are on disk this way.  You can lose some data in the event of a 
crash, but things will be faster.  Try your system with that 
configuration change.  If it gets rid of what you see as a performance 
problem, then the reliability changes made going from ext3 to ext4 are 
your problem.  If instead the server is still slow to you even with 
synchronous_commit disabled, whatever is happening is unlikely to be 
caused by the ext4 changes.  In just about every other way but commit 
performance, ext4 is faster than most other filesystems.

-- 
Greg Smith   2ndQuadrant US    greg@2ndQuadrant.com   Baltimore, MD
PostgreSQL Training, Services, and 24x7 Support  www.2ndQuadrant.us

view thread (8+ messages)  latest in thread

Message-ID: <4EC33277.6000103@2ndQuadrant.com>
Permalink:  ../4EC33277.6000103@2ndQuadrant.com/
Also on:    postgresql.org/message-id/4EC33277.6000103@2ndQuadrant.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 using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: greg@2ndQuadrant.com
  Subject: Re: What's the state of postgresql on ext4 now?
  In-Reply-To: <4EC33277.6000103@2ndQuadrant.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