Re: 9.2beta1, parallel queries, ReleasePredicateLocks, CheckForSerializableConflictIn in the oprofile

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Florian Pflug <fgp(at)phlo(dot)org>
Cc: Merlin Moncure <mmoncure(at)gmail(dot)com>, Sergey Koposov <koposov(at)ast(dot)cam(dot)ac(dot)uk>, Jeff Janes <jeff(dot)janes(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org, Stephen Frost <sfrost(at)snowman(dot)net>
Subject: Re: 9.2beta1, parallel queries, ReleasePredicateLocks, CheckForSerializableConflictIn in the oprofile
Date: 2012-06-01 20:40:52
Message-ID: CA+TgmoZncx81VrJuC5AccYThgDGg3jbGut1u4gEk+sDruEQm4A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Jun 1, 2012 at 3:16 PM, Florian Pflug <fgp(at)phlo(dot)org> wrote:
> Ok, now you've lost me. If the read() blocks, how on earth can a few
> additional pins/unpins ever account for any meaningful execution time?
>
> It seems to me that once read() blocks we're talking about a delay in the
> order of the scheduling granularity (i.e., milliseconds, in the best case),
> while even in the word case pinning a buffer shouldn't take more than
> 1000 cycles (for comparison, I think a cache miss across all layers costs
> a few hundred cycles). So there's at the very least 3 order of magnitude
> between those two...

I'm not sure what you want me to say here. s_lock shows up in the
profile, and some of that is from PinBuffer. I think any detectable
number of calls to s_lock is a sign of Bad Things (TM). I can't
reproduce anything as severe as what the OP is seeing, but what does
that prove? In a couple years we'll have systems with 128 cores
floating around, and things that are minor problems at 32 or even 64
cores will be crippling at 128 cores. IME, spinlock contention has a
very sharp tipping point. It's only a minor annoyance and then you
hit some threshold number of cores and, bam, you're spending 70-90% of
your time across all cores fighting over that one spinlock.

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2012-06-01 21:38:13 Re: Re: [COMMITTERS] pgsql: Send new protocol keepalive messages to standby servers.
Previous Message Florian Pflug 2012-06-01 19:16:35 Re: 9.2beta1, parallel queries, ReleasePredicateLocks, CheckForSerializableConflictIn in the oprofile