Re: profiling connection overhead

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: profiling connection overhead
Дата
Msg-id 18594.1290612342@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: profiling connection overhead  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: profiling connection overhead  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> On Wed, Nov 24, 2010 at 2:10 AM, Heikki Linnakangas
> <heikki.linnakangas@enterprisedb.com> wrote:
>> Micro-optimizing that search for the non-zero value helps a little bit
>> (attached). Reduces the percentage shown by oprofile from about 16% to 12%
>> on my laptop.

That "micro-optimization" looks to me like your compiler leaves
something to be desired.

> The first optimization that occurred to me was "remove the loop
> altogether".

Or make it execute only in assert-enabled mode, perhaps.

This check had some use back in the bad old days, but the ResourceOwner
mechanism has probably removed a lot of the argument for it.

The counter-argument might be that failing to remove a buffer pin would
be disastrous; but I can't see that it'd be worse than failing to remove
an LWLock, and we have no belt-and-suspenders-too loop for those.
        regards, tom lane


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Simon Riggs
Дата:
Сообщение: Re: Hot Standby: too many KnownAssignedXids
Следующее
От: Joachim Wieland
Дата:
Сообщение: Re: Suggested "easy" TODO: pg_dump --from-list