Re: Further XLogInsert scaling tweaking

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: Further XLogInsert scaling tweaking
Дата
Msg-id 20130903163319.GB5227@eldon.alvh.no-ip.org
обсуждение исходный текст
Ответ на Re: Further XLogInsert scaling tweaking  (Bruce Momjian <bruce@momjian.us>)
Список pgsql-hackers
Bruce Momjian wrote:
> On Mon, Sep  2, 2013 at 10:14:03AM +0300, Heikki Linnakangas wrote:
> > diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c
> > index 39c58d0..28e62ea 100644

> > -    XLogInsertSlotPadded *insertSlots;
> > +    /*
> > +     * Make sure the above heavily-contended spinlock and byte positions are
> > +     * on their own cache line. In particular, the RedoRecPtr and full page
> > +     * write variables below should be on a different cache line. They are
> > +     * read on every WAL insertion, but updated rarely, and we don't want
> > +     * those reads to steal the cache line containing Curr/PrevBytePos.
> > +     */
> > +    char        pad[128];
> 
> Do we adjust for cache line lengths anywhere else?  PGPROC?  Should it
> be a global define?

We have LWLockPadded in lwlock.c; it only adjusts the size of the struct
to be a power of 2.

-- 
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services



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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: Backup throttling
Следующее
От: Robert Haas
Дата:
Сообщение: Re: [9.4] Make full_page_writes only settable on server start?