Re: Reducing Memory Consumption (aset and generation)

Поиск
Список
Период
Сортировка
От David Rowley
Тема Re: Reducing Memory Consumption (aset and generation)
Дата
Msg-id CAApHDvpEHkxEct7C0cQt+YC+d8d5ww+qM=Bk8+j7uCqn9S+ySg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Reducing Memory Consumption (aset and generation)  (Matthias van de Meent <boekewurm+postgres@gmail.com>)
Ответы Re: Reducing Memory Consumption (aset and generation)  (Ranier Vilela <ranier.vf@gmail.com>)
Список pgsql-hackers
On Mon, 11 Jul 2022 at 20:48, Matthias van de Meent
<boekewurm+postgres@gmail.com> wrote:
> > 2) v1-002-generation-reduces-memory-consumption.patch
> > Reduces memory used by struct GenerationBlock, by minus 8 bits,
>
> That seems fairly straight-forward -- 8 bytes saved on each page isn't
> a lot, but it's something.

I think 002 is likely the only patch here that has some merit.
However, it's hard to imagine any measurable performance gains from
it.  I think the smallest generation block we have today is 8192
bytes. Saving 8 bytes in that equates to a saving of 0.1% of memory.
For an 8MB page, it's 1024 times less than that.

I imagine Ranier has been working on this due the performance
regression mentioned in [1].  I think it'll be much more worthwhile to
aim to reduce the memory chunk overheads rather than the block
overheads, as Ranier is doing here. I posted a patch in [2] which does
that.  To make that work, I need to have the owning context in the
block. The 001 and 003 patch seems to remove those here.

David

[1] https://www.postgresql.org/message-id/CAApHDvqXpLzav6dUeR5vO_RBh_feHrHMLhigVQXw9jHCyKP9PA@mail.gmail.com
[2] https://www.postgresql.org/message-id/CAApHDvpjauCRXcgcaL6+e3eqecEHoeRm9D-kcbuvBitgPnW=vw@mail.gmail.com



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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: Remove trailing newlines from pg_upgrade's messages
Следующее
От: Masahiko Sawada
Дата:
Сообщение: Re: [BUG] Logical replication failure "ERROR: could not map filenode "base/13237/442428" to relation OID" with catalog modifying txns