Re: Wait free LW_SHARED acquisition - v0.2

From: Andres Freund <andres(at)2ndquadrant(dot)com>
To: Peter Geoghegan <pg(at)heroku(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Wait free LW_SHARED acquisition - v0.2
Date: 2014-02-04 09:01:28
Message-ID: 20140204090128.GC12016@awork2.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2014-02-03 17:51:20 -0800, Peter Geoghegan wrote:
> On Sun, Feb 2, 2014 at 6:00 AM, Andres Freund <andres(at)2ndquadrant(dot)com> wrote:
> > On 2014-02-01 19:47:29 -0800, Peter Geoghegan wrote:
> >> Here are the results of a benchmark on Nathan Boley's 64-core, 4
> >> socket server: http://postgres-benchmarks.s3-website-us-east-1.amazonaws.com/amd-4-socket-rwlocks/
> >
> > That's interesting. The maximum number of what you see here (~293125)
> > is markedly lower than what I can get.
> >
> > ... poke around ...
> >
> > Hm, that's partially because you're using pgbench without -M prepared if
> > I see that correctly. The bottleneck in that case is primarily memory
> > allocation. But even after that I am getting higher
> > numbers: ~342497.
> >
> > Trying to nail down the differnce it oddly seems to be your
> > max_connections=80 vs my 100. The profile in both cases is markedly
> > different, way much more spinlock contention with 80. All in
> > Pin/UnpinBuffer().
>
> I updated this benchmark, with your BufferDescriptors alignment patch
> [1] applied on top of master (while still not using "-M prepared" in
> order to keep the numbers comparable). So once again, that's:
>
> http://postgres-benchmarks.s3-website-us-east-1.amazonaws.com/amd-4-socket-rwlocks/
>
> It made a bigger, fairly noticeable difference, but not so big a
> difference as you describe here. Are you sure that you saw this kind
> of difference with only 64 clients, as you mentioned elsewhere [1]
> (perhaps you fat-fingered [1] -- "-cj" is ambiguous)? Obviously
> max_connections is still 80 in the above. Should I have gone past 64
> clients to see the problem? The best numbers I see with the [1] patch
> applied on master is only ~327809 for -S 10 64 clients. Perhaps I've
> misunderstood.

That's likely -M prepared. It was with -c 64 -j 64...

Greetings,

Andres Freund

--
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 Rajeev rastogi 2014-02-04 09:08:30 Re: Patch: Show process IDs of processes holding a lock; show relation and tuple infos of a lock to acquire
Previous Message Christian Kruse 2014-02-04 08:39:42 Re: Patch: Show process IDs of processes holding a lock; show relation and tuple infos of a lock to acquire