Re: Linux: more cores = less concurrency. - Mailing list pgsql-performance

From Kevin Grittner
Subject Re: Linux: more cores = less concurrency.
Date
Msg-id 4DA32DE3020000250003C68E@gw.wicourts.gov
Whole thread Raw
In response to Re: Linux: more cores = less concurrency.  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
Responses Re: Linux: more cores = less concurrency.  (Glyn Astill <glynastill@yahoo.co.uk>)
List pgsql-performance
"Kevin Grittner" <Kevin.Grittner@wicourts.gov> wrote:

> I don't know why you were hitting the knee sooner than I've seen
> in my benchmarks

If you're compiling your own executable, you might try boosting
LOG2_NUM_LOCK_PARTITIONS (defined in lwlocks.h) to 5 or 6.  The
current value of 4 means that there are 16 partitions to spread
contention for the lightweight locks which protect the heavyweight
locking, and this corresponds to your best throughput point.  It
might be instructive to see what happens when you tweak the number
of partitions.

Also, if you can profile PostgreSQL at the sweet spot and again at a
pessimal load, comparing the profiles should give good clues about
the points of contention.

-Kevin

pgsql-performance by date:

Previous
From: James Cloos
Date:
Subject: Re: Linux: more cores = less concurrency.
Next
From: David Rees
Date:
Subject: Re: Linux: more cores = less concurrency.