Re: Scaling XLog insertion (was Re: Moving more work outside WALInsertLock)

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
Cc: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Jeff Janes <jeff(dot)janes(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Scaling XLog insertion (was Re: Moving more work outside WALInsertLock)
Date: 2012-03-06 15:11:09
Message-ID: CA+TgmoZc5eWcqGytb40Wcb3MwCD6MyhO3eFOMfw6paFpWgw8Og@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Mar 6, 2012 at 10:07 AM, Heikki Linnakangas
<heikki(dot)linnakangas(at)enterprisedb(dot)com> wrote:
> I admit that block is longer than any of our existing spinlock blocks.
> However, it's important for performance. I tried using a lwlock earlier, and
> that negated the gains. So if that's a serious objection, then let's resolve
> that now before I spend any more time on other aspects of the patch. Any
> ideas how to make that block shorter?

We shouldn't put the cart in front of the horse. The point of keeping
spinlock acquisitions short is to improve performance by preventing
excess spinning. If the performance is better with a spinlock than
with an lwlock, then clearly the spinning isn't excessive, or at least
not in the case you tested.

That having been said, shorter critical sections are always good, of course...

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2012-03-06 15:12:35 Re: Scaling XLog insertion (was Re: Moving more work outside WALInsertLock)
Previous Message Heikki Linnakangas 2012-03-06 15:07:00 Re: Scaling XLog insertion (was Re: Moving more work outside WALInsertLock)