Re: Turning off atime on PostgreSQL DB volumes

Lists: pgsql-general
From: "Keaton Adams" <kadams(at)mxlogic(dot)com>
To: <pgsql-general(at)postgresql(dot)org>
Subject: Turning off atime on PostgreSQL DB volumes
Date: 2007-08-28 14:07:12
Message-ID: 0B34A6972BF39E4CB465A64DBBAD2BB9023ACEEC@mxlhq-exch01.corp.mxlogic.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

After reading several articles on the performance drag that Linux atime
has on file systems we would like to mount our DB volumes with the
noatime parameter to see just what type of a performance gain we will
achieve. Does PostgreSQL use atime in any way when reading/writing
data? If we turn off/disable atime on the DB volumes will that cause
any type of issue at all with PostgreSQL 8.1 on Red Hat Enterprise
Linux?

Ingo Molnar who is the real-time/performance guru of the Linux Kernel
wrote "I cannot over-emphasize how much of a deal it is in practice.
Atime updates are by far the biggest IO performance deficiency that
Linux has today. Getting rid of atime updates would give us more
everyday Linux performance than all the page cache speedups of the past
10 years, _combined_".

The atime is updated (synchronously) for queries as well as
updates/inserts whereas logs/journals are only updated (synchronously)
for the updates/inserts... This is true for every read -- even if it is
page by page -- each page request causes a synchronous atime update.

http://kerneltrap.org/node/14148

Thanks,

Keaton


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Keaton Adams" <kadams(at)mxlogic(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Turning off atime on PostgreSQL DB volumes
Date: 2007-08-28 17:46:57
Message-ID: 526.1188323217@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

"Keaton Adams" <kadams(at)mxlogic(dot)com> writes:
> After reading several articles on the performance drag that Linux atime
> has on file systems we would like to mount our DB volumes with the
> noatime parameter to see just what type of a performance gain we will
> achieve. Does PostgreSQL use atime in any way when reading/writing
> data?

No --- go for it, and let us know what you see.

regards, tom lane


From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Keaton Adams <kadams(at)mxlogic(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Turning off atime on PostgreSQL DB volumes
Date: 2007-08-28 17:51:29
Message-ID: 46D460A1.7000605@hagander.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

Keaton Adams wrote:
> After reading several articles on the performance drag that Linux atime
> has on file systems we would like to mount our DB volumes with the
> noatime parameter to see just what type of a performance gain we will
> achieve. Does PostgreSQL use atime in any way when reading/writing
> data? If we turn off/disable atime on the DB volumes will that cause
> any type of issue at all with PostgreSQL 8.1 on Red Hat Enterprise Linux?

No, it shouldn't cause any issues. Just turn it off.

//Magnus


From: Bill Moran <wmoran(at)potentialtech(dot)com>
To: "Keaton Adams" <kadams(at)mxlogic(dot)com>
Cc: <pgsql-general(at)postgresql(dot)org>
Subject: Re: Turning off atime on PostgreSQL DB volumes
Date: 2007-08-28 17:56:47
Message-ID: 20070828135647.c63265f0.wmoran@potentialtech.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

In response to "Keaton Adams" <kadams(at)mxlogic(dot)com>:

> After reading several articles on the performance drag that Linux atime
> has on file systems we would like to mount our DB volumes with the
> noatime parameter to see just what type of a performance gain we will
> achieve. Does PostgreSQL use atime in any way when reading/writing
> data? If we turn off/disable atime on the DB volumes will that cause
> any type of issue at all with PostgreSQL 8.1 on Red Hat Enterprise
> Linux?

I frequently run with noatime and have never noticed any problems.

--
Bill Moran
http://www.potentialtech.com


From: "Gavin M(dot) Roy" <gmr(at)myyearbook(dot)com>
To: "Keaton Adams" <kadams(at)mxlogic(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: Turning off atime on PostgreSQL DB volumes
Date: 2007-08-28 18:05:34
Message-ID: af1bce590708281105r1340be1ex62d94f338b95e9bf@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

We use noatime on our production database without issues.

On 8/28/07, Bill Moran <wmoran(at)potentialtech(dot)com> wrote:
> In response to "Keaton Adams" <kadams(at)mxlogic(dot)com>:
>
> > After reading several articles on the performance drag that Linux atime
> > has on file systems we would like to mount our DB volumes with the
> > noatime parameter to see just what type of a performance gain we will
> > achieve. Does PostgreSQL use atime in any way when reading/writing
> > data? If we turn off/disable atime on the DB volumes will that cause
> > any type of issue at all with PostgreSQL 8.1 on Red Hat Enterprise
> > Linux?
>
> I frequently run with noatime and have never noticed any problems.
>
> --
> Bill Moran
> http://www.potentialtech.com
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: explain analyze is your friend
>