Re: XLogInsert scaling, revisited
Ants Aasma <ants@cybertec.at>
From: Ants Aasma <ants@cybertec.at>
To: Heikki Linnakangas <hlinnakangas@vmware.com>
Cc: Andres Freund <andres@2ndquadrant.com>, Jeff Janes <jeff.janes@gmail.com>,
Alvaro Herrera <alvherre@2ndquadrant.com>,
PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2013-07-08T10:21:17Z
Lists: pgsql-hackers
On Mon, Jul 8, 2013 at 12:16 PM, Heikki Linnakangas <hlinnakangas@vmware.com> wrote: > Ok, I've committed this patch now. Finally, phew! Fantastic work! > I simplified the handling of xlogInsertingAt per discussion, and added the > memory barrier to GetXLogBuffer(). I ran again the pgbench tests I did > earlier with the now-committed version of the patch (except for some comment > changes). The results are here: I can't see a reason why a full memory barrier is needed at GetXLogBuffer, we just need to ensure that we read the content of the page after we check the end pointer from xlblocks. A read barrier is enough here unless there is some other undocumented interaction. I don't think it matters for performance, but it seems like good practice to have the barriers exactly matching the documentation. Regards, Ants Aasma -- Cybertec Schönig & Schönig GmbH Gröhrmühlgasse 26 A-2700 Wiener Neustadt Web: http://www.postgresql-support.de