Re: [HACKERS] Should we cacheline align PGXACT?

2017-09-22 Thread Alexander Korotkov
On Thu, Sep 21, 2017 at 12:08 PM, Alexander Korotkov < a.korot...@postgrespro.ru> wrote: > On Mon, Sep 18, 2017 at 12:41 PM, Daniel Gustafsson > wrote: > >> > On 16 Sep 2017, at 01:51, Alexander Korotkov >> wrote: >> > >> > On Tue, Sep 5, 2017 at 2:47

Re: [HACKERS] Should we cacheline align PGXACT?

2017-09-21 Thread Alexander Korotkov
On Mon, Sep 18, 2017 at 12:41 PM, Daniel Gustafsson wrote: > > On 16 Sep 2017, at 01:51, Alexander Korotkov > wrote: > > > > On Tue, Sep 5, 2017 at 2:47 PM, Daniel Gustafsson > wrote: > > > On 04 Apr 2017, at

Re: [HACKERS] Should we cacheline align PGXACT?

2017-09-18 Thread Daniel Gustafsson
> On 16 Sep 2017, at 01:51, Alexander Korotkov > wrote: > > On Tue, Sep 5, 2017 at 2:47 PM, Daniel Gustafsson > wrote: > > On 04 Apr 2017, at 14:58, David Steele > > wrote:

Re: [HACKERS] Should we cacheline align PGXACT?

2017-09-15 Thread Alexander Korotkov
On Tue, Sep 5, 2017 at 2:47 PM, Daniel Gustafsson wrote: > > On 04 Apr 2017, at 14:58, David Steele wrote: > > > > On 4/4/17 8:55 AM, Alexander Korotkov wrote: > >> On Mon, Apr 3, 2017 at 9:58 PM, Andres Freund >> > >>I'm inclined

Re: [HACKERS] Should we cacheline align PGXACT?

2017-09-05 Thread Daniel Gustafsson
> On 04 Apr 2017, at 14:58, David Steele wrote: > > On 4/4/17 8:55 AM, Alexander Korotkov wrote: >> On Mon, Apr 3, 2017 at 9:58 PM, Andres Freund > >>I'm inclined to push this to the next CF, it seems we need a lot more >>benchmarking here. >>

Re: [HACKERS] Should we cacheline align PGXACT?

2017-04-04 Thread Simon Riggs
On 4 April 2017 at 08:58, David Steele wrote: > On 4/4/17 8:55 AM, Alexander Korotkov wrote: >> On Mon, Apr 3, 2017 at 9:58 PM, Andres Freund > >> I'm inclined to push this to the next CF, it seems we need a lot more >> benchmarking here. >> >> >>

Re: [HACKERS] Should we cacheline align PGXACT?

2017-04-04 Thread David Steele
On 4/4/17 8:55 AM, Alexander Korotkov wrote: > On Mon, Apr 3, 2017 at 9:58 PM, Andres Freund > I'm inclined to push this to the next CF, it seems we need a lot more > benchmarking here. > > > No objections. This submission has been moved to CF 2017-07. Thanks, --

Re: [HACKERS] Should we cacheline align PGXACT?

2017-04-04 Thread Alexander Korotkov
On Mon, Apr 3, 2017 at 9:58 PM, Andres Freund wrote: > On 2017-03-25 19:35:35 +0300, Alexander Korotkov wrote: > > On Wed, Mar 22, 2017 at 12:23 AM, David Steele > wrote: > > > > > Hi Alexander > > > > > > On 3/10/17 8:08 AM, Alexander Korotkov wrote: >

Re: [HACKERS] Should we cacheline align PGXACT?

2017-04-03 Thread Jim Van Fleet
iggs <si...@2ndquadrant.com>, Alvaro > Herrera <alvhe...@2ndquadrant.com>, Robert Haas > <robertmh...@gmail.com>, Bernd Helmle <maili...@oopsware.de>, Tomas > Vondra <tomas.von...@2ndquadrant.com>, pgsql-hackers hack...@postgresql.org> > Date: 04/0

Re: [HACKERS] Should we cacheline align PGXACT?

2017-04-03 Thread Andres Freund
On 2017-03-25 19:35:35 +0300, Alexander Korotkov wrote: > On Wed, Mar 22, 2017 at 12:23 AM, David Steele wrote: > > > Hi Alexander > > > > On 3/10/17 8:08 AM, Alexander Korotkov wrote: > > > > Results look good for me. Idea of committing both of patches looks > >>

Re: [HACKERS] Should we cacheline align PGXACT?

2017-03-24 Thread Robert Haas
On Fri, Mar 24, 2017 at 10:12 AM, Simon Riggs wrote: > On 10 March 2017 at 13:08, Alexander Korotkov > wrote: >> Results look good for me. Idea of committing both of patches looks >> attractive. > > I'll commit mine since I understand what it

Re: [HACKERS] Should we cacheline align PGXACT?

2017-03-24 Thread Simon Riggs
On 10 March 2017 at 13:08, Alexander Korotkov wrote: Results look good for me. Idea of committing both of patches looks > attractive. > I'll commit mine since I understand what it does. I'll look at the other one also, but won't commit yet. > We have pretty much

Re: [HACKERS] Should we cacheline align PGXACT?

2017-03-21 Thread David Steele
Hi Alexander On 3/10/17 8:08 AM, Alexander Korotkov wrote: Results look good for me. Idea of committing both of patches looks attractive. We have pretty much acceleration for read-only case and small acceleration for read-write case. I'll run benchmark on 72-cores machine as well. Have you

Re: [HACKERS] Should we cacheline align PGXACT?

2017-03-10 Thread Alexander Korotkov
On Fri, Mar 10, 2017 at 4:01 PM, Ashutosh Sharma wrote: > > I agree. Probably Simon's patch for reducing pgxact access could negate > > regression in pgxact alignment patch. > > Ashutosh, could please you run read-write and read-only tests when both > > these patches

Re: [HACKERS] Should we cacheline align PGXACT?

2017-03-10 Thread Ashutosh Sharma
Hi, > > I agree. Probably Simon's patch for reducing pgxact access could negate > regression in pgxact alignment patch. > Ashutosh, could please you run read-write and read-only tests when both > these patches applied? I already had the results with both the patches applied. But, as I was not

Re: [HACKERS] Should we cacheline align PGXACT?

2017-03-10 Thread Alexander Korotkov
On Wed, Mar 1, 2017 at 6:44 PM, Ashutosh Sharma wrote: > On Wed, Mar 1, 2017 at 5:29 PM, Simon Riggs wrote: > > > > On 1 March 2017 at 04:50, Ashutosh Sharma wrote: > >> > >> On Tue, Feb 28, 2017 at 11:44 PM, Simon Riggs

Re: [HACKERS] Should we cacheline align PGXACT?

2017-03-01 Thread Ashutosh Sharma
On Wed, Mar 1, 2017 at 5:29 PM, Simon Riggs wrote: > > On 1 March 2017 at 04:50, Ashutosh Sharma wrote: >> >> On Tue, Feb 28, 2017 at 11:44 PM, Simon Riggs wrote: >>> >>> On 28 February 2017 at 11:34, Ashutosh Sharma

Re: [HACKERS] Should we cacheline align PGXACT?

2017-03-01 Thread Simon Riggs
On 1 March 2017 at 04:50, Ashutosh Sharma wrote: > On Tue, Feb 28, 2017 at 11:44 PM, Simon Riggs > wrote: > >> On 28 February 2017 at 11:34, Ashutosh Sharma >> wrote: >> >> >>> So, Here are the pgbench results I got with '

Re: [HACKERS] Should we cacheline align PGXACT?

2017-02-28 Thread Ashutosh Sharma
On Tue, Feb 28, 2017 at 11:44 PM, Simon Riggs wrote: > On 28 February 2017 at 11:34, Ashutosh Sharma > wrote: > > >> So, Here are the pgbench results I got with ' >> *reduce_pgxact_access_AtEOXact.v2.patch*' on a read-write workload. >> > > Thanks

Re: [HACKERS] Should we cacheline align PGXACT?

2017-02-28 Thread Simon Riggs
On 28 February 2017 at 11:34, Ashutosh Sharma wrote: > So, Here are the pgbench results I got with ' > *reduce_pgxact_access_AtEOXact.v2.patch*' on a read-write workload. > Thanks for performing a test. I see a low yet noticeable performance gain across the board on

Re: [HACKERS] Should we cacheline align PGXACT?

2017-02-28 Thread Ashutosh Sharma
Hi, On Fri, Feb 24, 2017 at 12:22 PM, Ashutosh Sharma wrote: On Fri, Feb 24, 2017 at 10:41 AM, Simon Riggs wrote: > > On 24 February 2017 at 04:41, Ashutosh Sharma > wrote: > >> > >> Okay. As suggested by Alexander, I have

Re: [HACKERS] Should we cacheline align PGXACT?

2017-02-23 Thread Ashutosh Sharma
On Fri, Feb 24, 2017 at 10:41 AM, Simon Riggs wrote: > On 24 February 2017 at 04:41, Ashutosh Sharma wrote: >> >> Okay. As suggested by Alexander, I have changed the order of reading and >> doing initdb for each pgbench run. With these changes, I got

Re: [HACKERS] Should we cacheline align PGXACT?

2017-02-23 Thread Simon Riggs
On 24 February 2017 at 04:41, Ashutosh Sharma wrote: > Okay. As suggested by Alexander, I have changed the order of reading and > doing initdb for each pgbench run. With these changes, I got following > results at 300 scale factor with 8GB of shared buffer. > Would you be

Re: [HACKERS] Should we cacheline align PGXACT?

2017-02-23 Thread Ashutosh Sharma
Okay. As suggested by Alexander, I have changed the order of reading and doing initdb for each pgbench run. With these changes, I got following results at 300 scale factor with 8GB of shared buffer. *pgbench settings:* pgbench -i -s 300 postgres pgbench -M prepared -c $thread -j $thread -T

Re: [HACKERS] Should we cacheline align PGXACT?

2017-02-22 Thread Alvaro Herrera
I wonder if this "perf c2c" tool with Linux 4.10 might be useful in studying this problem. https://joemario.github.io/blog/2016/09/01/c2c-blog/ -- Álvaro Herrerahttps://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services -- Sent via

Re: [HACKERS] Should we cacheline align PGXACT?

2017-02-21 Thread Ashutosh Sharma
On Tue, Feb 21, 2017 at 5:52 PM, Alexander Korotkov wrote: > On Tue, Feb 21, 2017 at 2:37 PM, Andres Freund wrote: >> >> On 2017-02-21 16:57:36 +0530, Ashutosh Sharma wrote: >> > Yes, there is still some regression however it has come down by a >> >

Re: [HACKERS] Should we cacheline align PGXACT?

2017-02-21 Thread Alexander Korotkov
On Tue, Feb 21, 2017 at 2:37 PM, Andres Freund wrote: > On 2017-02-21 16:57:36 +0530, Ashutosh Sharma wrote: > > Yes, there is still some regression however it has come down by a > > small margin. I am not doing initdb for each run instead I am doing, > >

Re: [HACKERS] Should we cacheline align PGXACT?

2017-02-21 Thread Andres Freund
Hi, On 2017-02-21 16:57:36 +0530, Ashutosh Sharma wrote: > Yes, there is still some regression however it has come down by a > small margin. I am not doing initdb for each run instead I am doing, > dropdb-->createdb-->pgbench -i. Is dropping old database and creating > a new one for every run not

Re: [HACKERS] Should we cacheline align PGXACT?

2017-02-21 Thread Ashutosh Sharma
On Tue, Feb 21, 2017 at 4:21 PM, Alexander Korotkov wrote: > > Hi, Ashutosh! > On Mon, Feb 20, 2017 at 1:20 PM, Ashutosh Sharma > wrote: >> >> Following are the pgbench results for read-write workload, I got with >> pgxact-align-3 patch. The

Re: [HACKERS] Should we cacheline align PGXACT?

2017-02-21 Thread Alexander Korotkov
Hi, Ashutosh! On Mon, Feb 20, 2017 at 1:20 PM, Ashutosh Sharma wrote: > Following are the pgbench results for read-write workload, I got with > pgxact-align-3 patch. The results are for 300 scale factor with 8GB of > shared buffer i.e. when data fits into the shared

Re: [HACKERS] Should we cacheline align PGXACT?

2017-02-20 Thread Simon Riggs
On 20 February 2017 at 17:32, Robert Haas wrote: >>> Have you checked whether this >>> patch makes any noticeable performance difference? >> >> No, but then we're reducing the number of calls to PgXact directly; >> there is no heuristic involved, its just a pure saving. >

Re: [HACKERS] Should we cacheline align PGXACT?

2017-02-20 Thread Robert Haas
On Mon, Feb 20, 2017 at 10:49 PM, Simon Riggs wrote: >> Regarding reduce_pgxact_access_AtEOXact.v1.patch, it took me a few >> minutes to figure out that the comment was referring to >> ProcArrayEndTransaction(), so it might be good to be more explicit >> about that if we go

Re: [HACKERS] Should we cacheline align PGXACT?

2017-02-20 Thread Simon Riggs
On 20 February 2017 at 16:53, Robert Haas wrote: > On Mon, Feb 20, 2017 at 6:02 PM, Simon Riggs wrote: >> On 15 February 2017 at 19:15, Andres Freund wrote: >> >>> I think I previously >>> mentioned, even just removing the

Re: [HACKERS] Should we cacheline align PGXACT?

2017-02-20 Thread Robert Haas
On Mon, Feb 20, 2017 at 6:02 PM, Simon Riggs wrote: > On 15 February 2017 at 19:15, Andres Freund wrote: > >> I think I previously >> mentioned, even just removing the MyPgXact->xmin assignment in >> SnapshotResetXmin() is measurable performance wise

Re: [HACKERS] Should we cacheline align PGXACT?

2017-02-20 Thread Simon Riggs
On 15 February 2017 at 19:15, Andres Freund wrote: > I think I previously > mentioned, even just removing the MyPgXact->xmin assignment in > SnapshotResetXmin() is measurable performance wise and cache-hit ratio > wise. Currently, we issue SnapshotResetXmin() pointlessly at

Re: [HACKERS] Should we cacheline align PGXACT?

2017-02-20 Thread Ashutosh Sharma
Hi, >> On Thu, Feb 16, 2017 at 5:07 AM, Alexander Korotkov > >> wrote: > >> > On Wed, Feb 15, 2017 at 8:49 PM, Alvaro Herrera > >> > > >> > wrote: > >> >> Alexander Korotkov wrote: > >> >> > >> >> > Difference between master, pgxact-align-2

Re: [HACKERS] Should we cacheline align PGXACT?

2017-02-17 Thread Alexander Korotkov
On Fri, Feb 17, 2017 at 12:44 PM, Ashutosh Sharma wrote: > >> On Thu, Feb 16, 2017 at 5:07 AM, Alexander Korotkov > >> wrote: > >> > On Wed, Feb 15, 2017 at 8:49 PM, Alvaro Herrera > >> > > >> > wrote: > >> >>

Re: [HACKERS] Should we cacheline align PGXACT?

2017-02-17 Thread Ashutosh Sharma
Hi, >> On Thu, Feb 16, 2017 at 5:07 AM, Alexander Korotkov >> wrote: >> > On Wed, Feb 15, 2017 at 8:49 PM, Alvaro Herrera >> > >> > wrote: >> >> Alexander Korotkov wrote: >> >> >> >> > Difference between master, pgxact-align-2 and

Re: [HACKERS] Should we cacheline align PGXACT?

2017-02-17 Thread Alexander Korotkov
On Thu, Feb 16, 2017 at 4:58 PM, Robert Haas wrote: > On Thu, Feb 16, 2017 at 5:07 AM, Alexander Korotkov > wrote: > > On Wed, Feb 15, 2017 at 8:49 PM, Alvaro Herrera < > alvhe...@2ndquadrant.com> > > wrote: > >> Alexander Korotkov wrote: > >> >

Re: [HACKERS] Should we cacheline align PGXACT?

2017-02-16 Thread Robert Haas
On Thu, Feb 16, 2017 at 5:07 AM, Alexander Korotkov wrote: > On Wed, Feb 15, 2017 at 8:49 PM, Alvaro Herrera > wrote: >> Alexander Korotkov wrote: >> >> > Difference between master, pgxact-align-2 and pgxact-align-3 doesn't >> > exceed >> >

Re: [HACKERS] Should we cacheline align PGXACT?

2017-02-15 Thread Robert Haas
On Wed, Feb 15, 2017 at 2:15 PM, Andres Freund wrote: > I don't think that's true for several reasons. Separating out PGXACT > didn't just mean reducing the stride size of the access / preventing > sharing. It also meant that frequently changing fields in PGPROC aren't > on

Re: [HACKERS] Should we cacheline align PGXACT?

2017-02-15 Thread Andres Freund
Hi, On 2017-02-15 12:24:44 -0500, Robert Haas wrote: > If you pad PGXACT out to one cache line, you could likewise take a > snapshot by touching 1 cache line per backend, and they'd be > consecutive. Maybe that difference matters to the memory prefetching > controller, I dunno, Unfortunately

Re: [HACKERS] Should we cacheline align PGXACT?

2017-02-15 Thread Andres Freund
Hi, On 2017-02-15 11:43:17 -0500, Robert Haas wrote: > On Mon, Feb 13, 2017 at 11:07 AM, Alvaro Herrera > wrote: > > It seems to me that Andres comments here were largely ignored: > >

Re: [HACKERS] Should we cacheline align PGXACT?

2017-02-15 Thread Robert Haas
On Wed, Feb 15, 2017 at 12:48 PM, Tom Lane wrote: > Robert Haas writes: >> ... Maybe that difference matters to the memory prefetching >> controller, I dunno, but it seems funny that we did the PGXACT work to >> reduce the number of cache lines that had

Re: [HACKERS] Should we cacheline align PGXACT?

2017-02-15 Thread Alvaro Herrera
Alexander Korotkov wrote: > Difference between master, pgxact-align-2 and pgxact-align-3 doesn't exceed > per run variation. FWIW this would be more visible if you added error bars to each data point. Should be simple enough in gnuplot ... -- Álvaro Herrera

Re: [HACKERS] Should we cacheline align PGXACT?

2017-02-15 Thread Tom Lane
Robert Haas writes: > ... Maybe that difference matters to the memory prefetching > controller, I dunno, but it seems funny that we did the PGXACT work to > reduce the number of cache lines that had to be touched in order to > take a snapshot to improve performance, and now

Re: [HACKERS] Should we cacheline align PGXACT?

2017-02-15 Thread Robert Haas
On Wed, Feb 15, 2017 at 12:14 PM, Tom Lane wrote: > Robert Haas writes: >> On Mon, Feb 13, 2017 at 11:07 AM, Alvaro Herrera >> wrote: >>> It seems to me that Andres comments here were largely ignored: >>>

Re: [HACKERS] Should we cacheline align PGXACT?

2017-02-15 Thread Tom Lane
Robert Haas writes: > On Mon, Feb 13, 2017 at 11:07 AM, Alvaro Herrera > wrote: >> It seems to me that Andres comments here were largely ignored: >> https://www.postgresql.org/message-id/20160822021747.u5bqx2xwwjzac...@alap3.anarazel.de >> He was

Re: [HACKERS] Should we cacheline align PGXACT?

2017-02-15 Thread Robert Haas
On Mon, Feb 13, 2017 at 11:07 AM, Alvaro Herrera wrote: > It seems to me that Andres comments here were largely ignored: > https://www.postgresql.org/message-id/20160822021747.u5bqx2xwwjzac...@alap3.anarazel.de > He was suggesting to increase the struct size to 16 bytes

Re: [HACKERS] Should we cacheline align PGXACT?

2017-02-15 Thread Alexander Korotkov
On Wed, Feb 15, 2017 at 11:49 AM, Alexander Korotkov < a.korot...@postgrespro.ru> wrote: > On Mon, Feb 13, 2017 at 8:02 PM, Ashutosh Sharma > wrote: > >> I too have performed benchmarking of this patch on a large machine >> (with 128 CPU(s), 520GB RAM, intel x86-64

Re: [HACKERS] Should we cacheline align PGXACT?

2017-02-15 Thread Alexander Korotkov
Hi! On Mon, Feb 13, 2017 at 8:02 PM, Ashutosh Sharma wrote: > I too have performed benchmarking of this patch on a large machine > (with 128 CPU(s), 520GB RAM, intel x86-64 architecture) and would like > to share my observations for the same (Please note that, as I had to

Re: [HACKERS] Should we cacheline align PGXACT?

2017-02-14 Thread Alvaro Herrera
Alexander Korotkov wrote: > On Tue, Feb 14, 2017 at 3:57 PM, Alvaro Herrera > wrote: > > Yes, I understand. I just mean that it could be done something like > > this: > > > > #define PGXACTPadSize (PG_CACHE_LINE_SIZE - (offsetof(PGXACT, nxid) + > > sizeof(uint8))) > >

Re: [HACKERS] Should we cacheline align PGXACT?

2017-02-14 Thread Alexander Korotkov
On Tue, Feb 14, 2017 at 3:57 PM, Alvaro Herrera wrote: > Alexander Korotkov wrote: > > On Mon, Feb 13, 2017 at 7:07 PM, Alvaro Herrera < > alvhe...@2ndquadrant.com> > > wrote: > > > > Re the coding of the padding computation, seems it'd be better to use > > > our

Re: [HACKERS] Should we cacheline align PGXACT?

2017-02-14 Thread Alvaro Herrera
Alexander Korotkov wrote: > On Mon, Feb 13, 2017 at 7:07 PM, Alvaro Herrera > wrote: > > Re the coding of the padding computation, seems it'd be better to use > > our standard "offsetof(last-struct-member) + sizeof(last-struct-member)" > > rather than adding each of the

Re: [HACKERS] Should we cacheline align PGXACT?

2017-02-14 Thread Alexander Korotkov
On Mon, Feb 13, 2017 at 7:07 PM, Alvaro Herrera wrote: > Alexander Korotkov wrote: > > > Yes, influence seems to be low. But nevertheless it's important to > insure > > that there is no regression here. > > Despite pg_prewarm'ing and running tests 300s, there is still

Re: [HACKERS] Should we cacheline align PGXACT?

2017-02-13 Thread Ashutosh Sharma
Hi All, I too have performed benchmarking of this patch on a large machine (with 128 CPU(s), 520GB RAM, intel x86-64 architecture) and would like to share my observations for the same (Please note that, as I had to reverify readings on few client counts, it did take some time for me to share

Re: [HACKERS] Should we cacheline align PGXACT?

2017-02-13 Thread Bernd Helmle
Am Montag, den 13.02.2017, 16:55 +0300 schrieb Alexander Korotkov: > > Thank you for testing. > > Yes, influence seems to be low.  But nevertheless it's important to > insure > that there is no regression here. > Despite pg_prewarm'ing and running tests 300s, there is still > significant >

Re: [HACKERS] Should we cacheline align PGXACT?

2017-02-13 Thread Alvaro Herrera
Alexander Korotkov wrote: > Yes, influence seems to be low. But nevertheless it's important to insure > that there is no regression here. > Despite pg_prewarm'ing and running tests 300s, there is still significant > variation. > For instance, with clients count = 80: > * pgxact-result-2.txt –

Re: [HACKERS] Should we cacheline align PGXACT?

2017-02-13 Thread Alexander Korotkov
On Mon, Feb 13, 2017 at 3:34 PM, Bernd Helmle wrote: > Am Samstag, den 11.02.2017, 00:28 +0100 schrieb Tomas Vondra: > > Comparing averages of tps, measured on 5 runs (each 5 minutes long), > > the > > difference between master and patched master is usually within 2%, > >

Re: [HACKERS] Should we cacheline align PGXACT?

2017-02-13 Thread Bernd Helmle
Am Samstag, den 11.02.2017, 00:28 +0100 schrieb Tomas Vondra: > Comparing averages of tps, measured on 5 runs (each 5 minutes long), > the  > difference between master and patched master is usually within 2%, > which  > is pretty much within noise. > > I'm attaching spreadsheets with summary of

Re: [HACKERS] Should we cacheline align PGXACT?

2017-02-12 Thread Jim Nasby
On 8/22/16 12:24 AM, Andres Freund wrote: Somewhat naïve question from someone with much less clue about low level cache behaviour trying to follow along: given that we determine such padding at compile time, how do we ensure that the cacheline size we're targeting is right at runtime? There's

Re: [HACKERS] Should we cacheline align PGXACT?

2017-02-11 Thread Alexander Korotkov
On Sat, Feb 11, 2017 at 4:17 PM, Tomas Vondra wrote: > On 02/11/2017 01:21 PM, Alexander Korotkov wrote: > >> Hi, Tomas! >> >> On Sat, Feb 11, 2017 at 2:28 AM, Tomas Vondra >> > >> wrote: >> >>

Re: [HACKERS] Should we cacheline align PGXACT?

2017-02-11 Thread Ashutosh Sharma
> FWIW it might be interesting to have comparable results from the same > benchmarks I did. The scripts available in the git repositories should not > be that hard to tweak. Let me know if you're interested and need help with > that. > Sure, I will have a look into those scripts once I am done

Re: [HACKERS] Should we cacheline align PGXACT?

2017-02-11 Thread Tomas Vondra
On 02/11/2017 01:21 PM, Alexander Korotkov wrote: Hi, Tomas! On Sat, Feb 11, 2017 at 2:28 AM, Tomas Vondra > wrote: As discussed at the Developer meeting ~ a week ago, I've ran a number of benchmarks on the commit, on a

Re: [HACKERS] Should we cacheline align PGXACT?

2017-02-11 Thread Alexander Korotkov
Hi, Tomas! On Sat, Feb 11, 2017 at 2:28 AM, Tomas Vondra wrote: > As discussed at the Developer meeting ~ a week ago, I've ran a number of > benchmarks on the commit, on a small/medium-size x86 machines. I currently > don't have access to a machine as big as used

Re: [HACKERS] Should we cacheline align PGXACT?

2017-02-10 Thread Tomas Vondra
On 02/11/2017 02:44 AM, Ashutosh Sharma wrote: Hi, I am currently testing this patch on a large machine and will share the test results in few days of time. FWIW it might be interesting to have comparable results from the same benchmarks I did. The scripts available in the git repositories

Re: [HACKERS] Should we cacheline align PGXACT?

2017-02-10 Thread Ashutosh Sharma
Hi, I am currently testing this patch on a large machine and will share the test results in few days of time. Please excuse any grammatical errors as I am using my mobile device. Thanks. On Feb 11, 2017 04:59, "Tomas Vondra" wrote: > Hi, > > As discussed at the

Re: [HACKERS] Should we cacheline align PGXACT?

2017-02-10 Thread Tomas Vondra
Hi, As discussed at the Developer meeting ~ a week ago, I've ran a number of benchmarks on the commit, on a small/medium-size x86 machines. I currently don't have access to a machine as big as used by Alexander (with 72 physical cores), but it seems useful to verify the patch does not have

Re: [HACKERS] Should we cacheline align PGXACT?

2017-01-30 Thread Alexander Korotkov
On Sat, Aug 20, 2016 at 9:38 PM, Tom Lane wrote: > Robert Haas writes: > > Wow, nice results. My intuition on why PGXACT helped in the first place > was that it minimized the number of cache lines that had to be touched to > take a snapshot. Padding

Re: [HACKERS] Should we cacheline align PGXACT?

2016-08-21 Thread Andres Freund
On 2016-08-22 11:25:55 +0800, Craig Ringer wrote: > On 22 August 2016 at 10:40, Andres Freund wrote: > > > On 2016-08-19 09:46:12 -0400, Tom Lane wrote: > > > Alexander Korotkov writes: > > > > originally this idea was proposed by Andres Freund

Re: [HACKERS] Should we cacheline align PGXACT?

2016-08-21 Thread Craig Ringer
On 22 August 2016 at 10:40, Andres Freund wrote: > On 2016-08-19 09:46:12 -0400, Tom Lane wrote: > > Alexander Korotkov writes: > > > originally this idea was proposed by Andres Freund while experimenting > with > > > lockfree Pin/UnpinBuffer [1].

Re: [HACKERS] Should we cacheline align PGXACT?

2016-08-21 Thread Andres Freund
On 2016-08-19 09:46:12 -0400, Tom Lane wrote: > Alexander Korotkov writes: > > originally this idea was proposed by Andres Freund while experimenting with > > lockfree Pin/UnpinBuffer [1]. > > The patch is attached as well as results of pgbench -S on 72-cores > >

Re: [HACKERS] Should we cacheline align PGXACT?

2016-08-21 Thread Andres Freund
On 2016-08-20 14:33:13 -0400, Robert Haas wrote: > On Aug 19, 2016, at 2:12 AM, Alexander Korotkov > wrote: > > Hackers, > > > > originally this idea was proposed by Andres Freund while experimenting with > > lockfree Pin/UnpinBuffer [1]. > > The patch is attached as

Re: [HACKERS] Should we cacheline align PGXACT?

2016-08-20 Thread Tom Lane
Robert Haas writes: > Wow, nice results. My intuition on why PGXACT helped in the first place was > that it minimized the number of cache lines that had to be touched to take a > snapshot. Padding obviously would somewhat increase that again, so I can't > quite

Re: [HACKERS] Should we cacheline align PGXACT?

2016-08-20 Thread Robert Haas
On Aug 19, 2016, at 2:12 AM, Alexander Korotkov wrote: > Hackers, > > originally this idea was proposed by Andres Freund while experimenting with > lockfree Pin/UnpinBuffer [1]. > The patch is attached as well as results of pgbench -S on 72-cores machine. > As

Re: [HACKERS] Should we cacheline align PGXACT?

2016-08-19 Thread Amit Kapila
On Fri, Aug 19, 2016 at 8:24 PM, Alexander Korotkov wrote: > On Fri, Aug 19, 2016 at 3:19 PM, Amit Kapila > wrote: >> >> On Fri, Aug 19, 2016 at 11:42 AM, Alexander Korotkov >> wrote: >> > Hackers, >> > >> >

Re: [HACKERS] Should we cacheline align PGXACT?

2016-08-19 Thread Tom Lane
Alexander Korotkov writes: > On Fri, Aug 19, 2016 at 4:46 PM, Tom Lane wrote: >> That's one mighty ugly patch. Can't you do it without needing to >> introduce the additional layer of struct nesting? > That's worrying me too. > We could use

Re: [HACKERS] Should we cacheline align PGXACT?

2016-08-19 Thread Alexander Korotkov
On Fri, Aug 19, 2016 at 3:19 PM, Amit Kapila wrote: > On Fri, Aug 19, 2016 at 11:42 AM, Alexander Korotkov > wrote: > > Hackers, > > > > originally this idea was proposed by Andres Freund while experimenting > with > > lockfree Pin/UnpinBuffer

Re: [HACKERS] Should we cacheline align PGXACT?

2016-08-19 Thread Alexander Korotkov
On Fri, Aug 19, 2016 at 4:46 PM, Tom Lane wrote: > Alexander Korotkov writes: > > originally this idea was proposed by Andres Freund while experimenting > with > > lockfree Pin/UnpinBuffer [1]. > > The patch is attached as well as results of

Re: [HACKERS] Should we cacheline align PGXACT?

2016-08-19 Thread Tom Lane
Alexander Korotkov writes: > originally this idea was proposed by Andres Freund while experimenting with > lockfree Pin/UnpinBuffer [1]. > The patch is attached as well as results of pgbench -S on 72-cores > machine. As before it shows huge benefit in this case.

Re: [HACKERS] Should we cacheline align PGXACT?

2016-08-19 Thread Amit Kapila
On Fri, Aug 19, 2016 at 11:42 AM, Alexander Korotkov wrote: > Hackers, > > originally this idea was proposed by Andres Freund while experimenting with > lockfree Pin/UnpinBuffer [1]. > The patch is attached as well as results of pgbench -S on 72-cores machine. > As

[HACKERS] Should we cacheline align PGXACT?

2016-08-19 Thread Alexander Korotkov
Hackers, originally this idea was proposed by Andres Freund while experimenting with lockfree Pin/UnpinBuffer [1]. The patch is attached as well as results of pgbench -S on 72-cores machine. As before it shows huge benefit in this case. For sure, we should validate that it doesn't cause