Re: better atomics - v0.5

Поиск
Список
Период
Сортировка
От Ants Aasma
Тема Re: better atomics - v0.5
Дата
Msg-id CA+CSw_vta4=+uDhhmXjto7stc7SZrVc5NbJsJS15ZW+dP+GTug@mail.gmail.com
обсуждение исходный текст
Ответ на better atomics - v0.5  (Andres Freund <andres@2ndquadrant.com>)
Ответы Re: better atomics - v0.5  (Andres Freund <andres@2ndquadrant.com>)
Список pgsql-hackers
On Fri, Jun 27, 2014 at 9:00 PM, Andres Freund <andres@2ndquadrant.com> wrote:
> Imagine the situation for the buffer header spinlock which is one of the
> bigger performance issues atm. We could aim to replace all usages of
> that with clever and complicated logic, but it's hard.
>
> The IMO reasonable (and prototyped) way to do it is to make the common
> paths lockless, but fall back to the spinlock for the more complicated
> situations. For the buffer header that means that pin/unpin and buffer
> lookup are lockless, but IO and changing the identity of a buffer still
> require the spinlock. My attempts to avoid the latter basically required
> a buffer header specific reimplementation of spinlocks.

There is a 2010 paper [1] that demonstrates a fully non-blocking
approach to buffer management using the same generalized clock
algorithm that PostgreSQL has. The site also has an implementation for
Apache Derby. You may find some interesting ideas in there.

[1] http://code.google.com/p/derby-nb/source/browse/trunk/derby-nb/ICDE10_conf_full_409.pdf

Regards,
Ants Aasma
--
Cybertec Schönig & Schönig GmbH
Gröhrmühlgasse 26
A-2700 Wiener Neustadt
Web: http://www.postgresql-support.de



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

Предыдущее
От: Ian Barwick
Дата:
Сообщение: Re: "RETURNING PRIMARY KEY" syntax extension
Следующее
От: Kyotaro HORIGUCHI
Дата:
Сообщение: alter user set local_preload_libraries.