On 10/29/2015 01:18 PM, Alexander Korotkov wrote:
We got a consensus with Andres that we should commit the CAS version first
and look to other optimizations.
Refactored version of atomic state patch is attached. The changes are
following:
1) Macros are used for access refcount and usagecount.
2) likely/unlikely were removed. I think introducing of likely/unlikely
should be a separate patch since it touches portability. Also, I didn't see
any performance effect of this.
3) LockBufHdr returns the state after taking lock. Without using atomic
increments it still can save some loops on skip atomic value reading.


I have been testing this on a smaller system than yours - 2 socket Intel(R) Xeon(R) CPU E5-2683 v3 w/ 2 x RAID10 SSD disks (data + xlog), so focused on a smaller number of clients.

While I saw an improvement for the 'synchronous_commit = on' case - there is a small regression for 'off', using -M prepared + Unix Domain Socket. If that is something that should be considered right now.

Maybe it is worth to update the README to mention that the flags are maintained in an atomic uint32 now.

BTW, there are two CommitFest entries for this submission:

 https://commitfest.postgresql.org/7/370/
 https://commitfest.postgresql.org/7/408/

Best regards,
 Jesper

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to