Re: Deferring some AtStart* allocations?

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: Deferring some AtStart* allocations?
Дата
Msg-id 20141009195302.GH29124@awork2.int
обсуждение исходный текст
Ответ на Re: Deferring some AtStart* allocations?  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: Deferring some AtStart* allocations?
Список pgsql-hackers
On 2014-10-09 15:01:19 -0400, Robert Haas wrote:
> On Thu, Oct 9, 2014 at 8:20 AM, Andres Freund <andres@2ndquadrant.com> wrote:
> > On 2014-10-09 08:18:18 -0400, Robert Haas wrote:
> >> On Thu, Oct 9, 2014 at 5:34 AM, Andres Freund <andres@2ndquadrant.com> wrote:
> >> > Interesting - in my local profile AtStart_Inval() is more pronounced
> >> > than AfterTriggerBeginQuery(). I've quickly and in a ugly fashion hacked
> >> > AtStart_Inval() out of readonly queries ontop of your patch. Together
> >> > that yields a ~3.5% performance improvement in my trivial 'SELECT * FROM
> >> > tbl WHER pkey = xxx' testcase.
> >>
> >> Whoa.  Now that's clearly significant.
> >
> > Well, my guess it'll be far less noticeable in less trivial
> > workloads. But it does seem worthwile.
> >
> >> You didn't attach the patch; was that inadvertent, or was it too ugly
> >> for that?
> >
> > Far, far too ugly ;). I just removed the AtStart() call from xact.c and
> > sprinkled it around relevant places instead ;)
> 
> OK, here's an attempt at a real patch for that.  I haven't perf-tested this.

Neato. With a really trivial SELECT:

before:
tps = 28150.794776 (excluding connections establishing)
after:
tps = 29978.767703 (excluding connections establishing)

slightly more meaningful:

before:
tps = 21272.400039 (including connections establishing)
after:
tps = 22290.703482 (excluding connections establishing)

So that's a noticeable win. Obviously it's going to be less for more
complicated stuff, but still...

I've not really looked at the patches though.

Greetings,

Andres Freund

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



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Heikki Linnakangas
Дата:
Сообщение: Re: Last Commitfest patches waiting review
Следующее
От: "MauMau"
Дата:
Сообщение: Re: [9.4 bug] The database server hangs with write-heavy workload on Windows