Re: s_lock() seems too aggressive for machines with many sockets - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: s_lock() seems too aggressive for machines with many sockets
Date
Msg-id 20150610133149.GC25470@momjian.us
Whole thread Raw
In response to s_lock() seems too aggressive for machines with many sockets  (Jan Wieck <jan@wi3ck.info>)
List pgsql-hackers
On Wed, Jun 10, 2015 at 09:18:56AM -0400, Jan Wieck wrote:
> The attached patch demonstrates that less aggressive spinning and
> (much) more often delaying improves the performance "on this type of
> machine". The 8 socket machine in question scales to over 350,000
> TPS.
> 
> The patch is meant to demonstrate this effect only. It has a
> negative performance impact on smaller machines and client counts <
> #cores, so the real solution will probably look much different. But
> I thought it would be good to share this and start the discussion
> about reevaluating the spinlock code before PGCon.

Wow, you are in that code!  We kind of guessed on some of those
constants many years ago, and never revisited it.  It would be nice to
get a better heuristic for those, but I am concerned it would require
the user to specify the number of CPU cores.

--  Bruce Momjian  <bruce@momjian.us>        http://momjian.us EnterpriseDB
http://enterprisedb.com
 + Everyone has their own god. +



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: s_lock() seems too aggressive for machines with many sockets
Next
From: Kevin Grittner
Date:
Subject: Re: The Future of Aggregation