Thread: 2.6.26 kernel and PostgreSQL

2.6.26 kernel and PostgreSQL

From
Glyn Astill
Date:
Hi chaps,

Is anyone using 2.6.26 with postgres?  I was thinking about shifting my home test machine up from 2.6.18, however I
recallreading a post somewhere a while back about the scheduler in more recent versions being a bit cranky... 

I just thought I'd ask before I go ahead, I don't have too much time for testing etc at the moment.

thanks
Glyn




Re: 2.6.26 kernel and PostgreSQL

From
"Kevin Grittner"
Date:
Glyn Astill <glynastill@yahoo.co.uk> wrote:
> I was thinking about shifting my home test machine up from 2.6.18,
> however I recall reading a post somewhere a while back about the
> scheduler in more recent versions being a bit cranky...

A recent post on the topic:

http://archives.postgresql.org/pgsql-performance/2009-04/msg00098.php

-Kevin

Re: 2.6.26 kernel and PostgreSQL

From
Glyn Astill
Date:



--- On Fri, 10/4/09, Kevin Grittner <Kevin.Grittner@wicourts.gov> wrote:

> Glyn Astill <glynastill@yahoo.co.uk> wrote:
> > I was thinking about shifting my home test machine up
> from 2.6.18,
> > however I recall reading a post somewhere a while back
> about the
> > scheduler in more recent versions being a bit
> cranky...
>
> A recent post on the topic:
>
> http://archives.postgresql.org/pgsql-performance/2009-04/msg00098.php
>
> -Kevin
>

So it was only for connections over a unix socket, but wow; it's still an ongoing issue.  Nice to see somebody is on
topof it though. 





Re: 2.6.26 kernel and PostgreSQL

From
Greg Smith
Date:
On Fri, 10 Apr 2009, Glyn Astill wrote:

> So it was only for connections over a unix socket, but wow; it's still
> an ongoing issue.

The problem is actually with pgbench when running on a UNIX socket, not
with the PostgreSQL server itself.  On my tests, the actual database
server itself seems to work just as well or better on later kernels that
use the new scheduler than the older scheduler did.

Basically, if all these apply:

1) You are running pgbench
2) You're running a quick statement, such as a simple select, that gives
>10000TPS or so
3) Connecting via UNIX socket
4) Clients > around 10
5) Linux kernel >=2.6.23 (which means CFS as the scheduler)
6) The CFS features are at their defaults (SCHED_FEAT_SYNC_WAKEUPS is on)

You'll get weird results.  Change any of those and things are still fine.

--
* Greg Smith gsmith@gregsmith.com http://www.gregsmith.com Baltimore, MD

Re: 2.6.26 kernel and PostgreSQL

From
Glyn Astill
Date:



--- On Mon, 13/4/09, Greg Smith <gsmith@gregsmith.com> wrote:

> From: Greg Smith <gsmith@gregsmith.com>
> Subject: Re: [PERFORM] 2.6.26 kernel and PostgreSQL
> To: "Glyn Astill" <glynastill@yahoo.co.uk>
> Cc: pgsql-performance@postgresql.org, "Kevin Grittner" <Kevin.Grittner@wicourts.gov>
> Date: Monday, 13 April, 2009, 9:25 AM
> On Fri, 10 Apr 2009, Glyn Astill wrote:
>
> > So it was only for connections over a unix socket, but
> wow; it's still an ongoing issue.
>
> The problem is actually with pgbench when running on a UNIX
> socket, not with the PostgreSQL server itself.  On my tests,
> the actual database server itself seems to work just as well
> or better on later kernels that use the new scheduler than
> the older scheduler did.
>
> Basically, if all these apply:
>
> 1) You are running pgbench
> 2) You're running a quick statement, such as a simple
> select, that gives
> > 10000TPS or so
> 3) Connecting via UNIX socket
> 4) Clients > around 10
> 5) Linux kernel >=2.6.23 (which means CFS as the
> scheduler)
> 6) The CFS features are at their defaults
> (SCHED_FEAT_SYNC_WAKEUPS is on)
>
> You'll get weird results.  Change any of those and
> things are still fine.
>

Ace, I'll upgrade today then. Thanks Greg