Re: Move PinBuffer and UnpinBuffer to atomics
От | Alexander Korotkov |
---|---|
Тема | Re: Move PinBuffer and UnpinBuffer to atomics |
Дата | |
Msg-id | CAPpHfdtCUEWvEMwHcY5maELfGspjW6NSqtTQKsUQXgNcXz=GBA@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Move PinBuffer and UnpinBuffer to atomics (Andres Freund <andres@anarazel.de>) |
Ответы |
Re: Move PinBuffer and UnpinBuffer to atomics
|
Список | pgsql-hackers |
On Tue, Apr 12, 2016 at 12:40 AM, Andres Freund <andres@anarazel.de> wrote:
performance is sensitive to various parameters influencing memoryI did get access to the machine (thanks!). My testing shows that
allocation. E.g. twiddling with max_connections changes
performance. With max_connections=400 and the previous patches applied I
get ~1220000 tps, with 402 ~1620000 tps. This sorta confirms that we're
dealing with an alignment/sharing related issue.
Padding PGXACT to a full cache-line seems to take care of the largest
part of the performance irregularity. I looked at perf profiles and saw
that most cache misses stem from there, and that the percentage (not
absolute amount!) changes between fast/slow settings.
To me it makes intuitive sense why you'd want PGXACTs to be on separate
cachelines - they're constantly dirtied via SnapshotResetXmin(). Indeed
making it immediately return propels performance up to 1720000, without
other changes. Additionally cacheline-padding PGXACT speeds things up to
1750000 tps.
------
В списке pgsql-hackers по дате отправления: