Re: Minor optimisation of XLogInsert()

Поиск
Список
Период
Сортировка
От Simon Riggs
Тема Re: Minor optimisation of XLogInsert()
Дата
Msg-id CA+U5nMLLuxC2LMfGCCxeDTrh8+JL65yQjAtaRoDQgZTK8AmDwg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Minor optimisation of XLogInsert()  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: Minor optimisation of XLogInsert()  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
On Wed, Nov 16, 2011 at 8:42 PM, Robert Haas <robertmhaas@gmail.com> wrote:

> Taking the median of those five results, the patch seems to have sped
> things up by 0.3%.  At 80 clients:

Thanks for doing that. Even if we fix it as you suggest it seems to
indicate that the WALInsertLock contention is real rather than false
contention. Which lends some clues as to how to proceed.

> One possible explanation is that I don't believe that what you've done
> here is actually sufficient to guarantee alignment on cache-line
> boundary - ShmemAlloc() only guarantees MAXALIGN alignment unless the
> allocation is at least BLCKSZ bytes.  So depending on exactly how much
> shared memory gets allocated before XLogCtlData gets allocated, it's
> possible that the change could actually end up splitting all of the
> things you're trying to put on their own cache line across two cache
> lines.  Might be worth fixing that and running this through its paces
> again.
>
> (I wonder if we shouldn't just align every shared memory allocation to
> 64 or 128 bytes.  It wouldn't waste much memory and it would make us
> much more resistant to performance changes caused by minor
> modifications to the shared memory layout.)

I'll look at that, thanks for the suggestion.

--
 Simon Riggs                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services


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

Предыдущее
От: Royce Ausburn
Дата:
Сообщение: [Review] Include detailed information about a row failing a CHECK constraint into the error message
Следующее
От: Tom Lane
Дата:
Сообщение: Are range_before and range_after commutator operators?