Memory Alignment in Postgres

Поиск
Список
Период
Сортировка
От Arthur Silva
Тема Memory Alignment in Postgres
Дата
Msg-id CAO_YK0UzXZjyQdRt4PNWQ=R2udQug4FaW5HScE6nAhU8rC43Uw@mail.gmail.com
обсуждение исходный текст
Ответы Re: Memory Alignment in Postgres  (Bruce Momjian <bruce@momjian.us>)
Re: Memory Alignment in Postgres  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
I'm continuously studying Postgres codebase. Hopefully I'll be able to make some contributions in the future.

For now I'm intrigued about the extensive use of memory alignment. I'm sure there's some legacy and some architecture that requires it reasoning behind it.

That aside, since it wastes space (a lot of space in some cases) there must be a tipping point somewhere. I'm sure one can prove aligned access is faster in a micro-benchmark but I'm not sure it's the case in a DBMS like postgres, specially in the page/rows area.

Just for the sake of comparison Mysql COMPACT storage (default and recommended since 5.5) doesn't align data at all. Mysql NDB uses a fixed 4-byte alignment. Not sure about Oracle and others.

Is it worth the extra space in newer architectures (specially Intel)?
Do you guys think this is something worth looking at?

I'm trying to messing with the *ALIGN macros but so far I wasn't able to get any conclusive results. My guess is that I'm missing something in the code or pg_bench doesn't stress the difference enough.

--
Arthur Silva

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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: WIP Patch for GROUPING SETS phase 1
Следующее
От: Robert Haas
Дата:
Сообщение: Re: bad estimation together with large work_mem generates terrible slow hash joins