Re: [HACKERS] Should we cacheline align PGXACT? - Mailing list pgsql-hackers

From Robert Haas
Subject Re: [HACKERS] Should we cacheline align PGXACT?
Date
Msg-id CA+TgmoaO68vPoYgKVhZvMeHgrJj1tnTZ7QYSsf7FUxpG9tA1ZQ@mail.gmail.com
Whole thread Raw
In response to Re: [HACKERS] Should we cacheline align PGXACT?  (Andres Freund <andres@anarazel.de>)
List pgsql-hackers
On Wed, Feb 15, 2017 at 2:15 PM, Andres Freund <andres@anarazel.de> 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 the same cache-line as fields in PGXACT.  That makes quite a
> difference, because with the split a lot of the cachelines "backing"
> PGPROC can stay in 'shared' mode in several CPU caches, while
> modifications to PGPROC largely can stay in 'exclusive' mode locally on
> the CPU the backend is currently running on.  I think I previously
> mentioned, even just removing the MyPgXact->xmin assignment in
> SnapshotResetXmin() is measurable performance wise and cache-hit ratio
> wise.

Oh, hmm.  I didn't think about that angle.

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



pgsql-hackers by date:

Previous
From: Ryan Murphy
Date:
Subject: Re: [HACKERS] Does having a NULL column automatically exclude thetable from the tupleDesc cache?
Next
From: Tom Lane
Date:
Subject: Re: [HACKERS] operator_precedence_warning vs make installcheck