Re: XLogInsert scaling, revisited

From: Andres Freund <andres(at)2ndquadrant(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>
Subject: Re: XLogInsert scaling, revisited
Date: 2012-09-20 15:51:30
Message-ID: 201209201751.30910.andres@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thursday, September 20, 2012 05:37:42 PM Tom Lane wrote:
> Heikki Linnakangas <hlinnakangas(at)vmware(dot)com> writes:
> > I've been slowly continuing to work that I started last winder to make
> > XLogInsert scale better. I have tried quite a few different approaches
> > since then, and have settled on the attached. This is similar but not
> > exactly the same as what I did in the patches I posted earlier.
Sounds pretty cool from a quick read.

> This sounds pretty good. I'm a bit bothered by the fact that you've
> settled on 7 parallel-insertion slots after testing on an 8-core
> machine. I suspect that it's not a coincidence that you're seeing
> a sweet spot for #slots ~= #CPUs. If that is what's happening, we're
> going to want to be able to configure the #slots at postmaster start.
> Not sure how we'd go about it exactly - is there any reasonably portable
> way to find out how many CPUs the machine has? Or do we have to use a
> GUC for that?
Several platforms support sysconf(_SC_NPROCESSORS_CONF) although after a quick
look it doesn't seem to be standardized. A guc initialized to that or falling
back to 4 or so?

Andres
--
Andres Freund http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2012-09-20 15:55:53 Re: XLogInsert scaling, revisited
Previous Message Merlin Moncure 2012-09-20 15:49:01 Re: Invalid optimization of VOLATILE function in WHERE clause?