Re: Process local hint bit cache

Поиск
Список
Период
Сортировка
От Greg Stark
Тема Re: Process local hint bit cache
Дата
Msg-id AANLkTimrdq9kdub3cyK_WZaufxMhq=0km+-amvvRf+C_@mail.gmail.com
обсуждение исходный текст
Ответ на Process local hint bit cache  (Merlin Moncure <mmoncure@gmail.com>)
Ответы Re: Process local hint bit cache  (Robert Haas <robertmhaas@gmail.com>)
Re: Process local hint bit cache  (Merlin Moncure <mmoncure@gmail.com>)
Список pgsql-hackers
On Tue, Mar 29, 2011 at 10:34 PM, Merlin Moncure <mmoncure@gmail.com> wrote:
> So I went back to the drawing board, reviewed the archives, and came
> up with a new proposal.  I'd like to see a process local clog page
> cache of around 1-4 pages (8-32kb typically) that would replace the
> current TransactionLogFetch last xid cache. It should be small,
> because I doubt more would really help much (see below) and we want to
> keep this data in the tight cpu caches since it's going to be
> constantly scanned.
>

How is this different from the existing clog SLRU? It seems like the
fundamental difference is that you plan to defer updating the hint
bits rather than update them every time the row is accessed. That
doesn't seem like a net win, it'll just defer the i/o, not eliminate
it. I suppose the existing clog SLRU is page-based whereas this could
cache individual xids in a btree so that it could have a higher hit
rate. Or we could just increase the clog SLRU size if there's any
evidence there are often cache misses on it. I suggested having the
SLRU share memory pages with the buffer cache so it would
automatically size itself rather than having to be statically sized.

There is something to be gained by trying to update *all* the hint
bits on a page whenever any row is updated. And there might be
something to be gained by not dirtying the page so we only update the
hint bits on disk if the page is dirtied for some other reason.

But one way or another the hint bits have to get set sometime. The
sooner that happens the less clog i/o has to happen in the meantime.

--
greg


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

Предыдущее
От: Heikki Linnakangas
Дата:
Сообщение: Re: Process local hint bit cache
Следующее
От: Robert Haas
Дата:
Сообщение: Re: gcc 4.6 warnings -Wunused-but-set-variable