On 17 November 2014 07:31, Jeff Davis <pg...@j-davis.com> wrote: > On Sat, 2014-11-15 at 21:36 +0000, Simon Riggs wrote: >> Do I understand correctly that we are trying to account for exact >> memory usage at palloc/pfree time? Why?? > > Not palloc chunks, only tracking at the level of allocated blocks (that > we allocate with malloc). > > It was a surprise to me that accounting at that level would have any > measurable impact, but Robert found a reasonable case on a POWER machine > that degraded a couple percent. I wasn't able to reproduce it > consistently on x86.
Surprise to me also. Robert's tests showed a deviation of 0.4 sec after a restart. ISTM that we wouldn't see that every time. AFAIK the whole purpose of the memory allocator is to reduce the number of system calls, so if we are doing so many malloc() calls as to be noticeable just for accounting then something is wrong. -- Simon Riggs http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers