Re: PrivateRefCount (for 8.3)

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: PrivateRefCount (for 8.3)
Дата
Msg-id 21766.1164653069@sss.pgh.pa.us
обсуждение исходный текст
Ответ на PrivateRefCount (for 8.3)  ("Simon Riggs" <simon@2ndquadrant.com>)
Ответы Re: PrivateRefCount (for 8.3)  ("Simon Riggs" <simon@2ndquadrant.com>)
Re: PrivateRefCount (for 8.3)  (NikhilS <nikkhils@gmail.com>)
Список pgsql-hackers
"Simon Riggs" <simon@2ndquadrant.com> writes:
> Under specific conditions, I propose to replace the array with a hash
> table, designed with a custom hash function that would map the pins held
> onto just 16 hash buckets.

> Comments?

Most likely a waste of development effort --- have you got any evidence
of a real effect here?  With 200 max_connections the size of the arrays
is still less than 10% of the space occupied by the buffers themselves,
ergo there isn't going to be all that much cache-thrashing compared to
what happens in the buffers themselves.  You're going to be hard pressed
to buy back the overhead of the hashing.

It might be interesting to see whether we could shrink the refcount
entries to int16 or int8.  We'd need some scheme to deal with overflow,
but given that the counts are now backed by ResourceOwner entries, maybe
extra state could be kept in those entries to handle it.
        regards, tom lane


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

Предыдущее
От: "Jim C. Nasby"
Дата:
Сообщение: Re: [CORE] RC1 blocker issues
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Configuring BLCKSZ and XLOGSEGSZ (in 8.3)