Re: Pre-alloc ListCell's optimization

Поиск
Список
Период
Сортировка
От Stephen Frost
Тема Re: Pre-alloc ListCell's optimization
Дата
Msg-id 20120516162439.GT1267@tamriel.snowman.net
обсуждение исходный текст
Ответ на Re: Pre-alloc ListCell's optimization  (Stephen Frost <sfrost@snowman.net>)
Ответы Re: Pre-alloc ListCell's optimization  (Stephen Frost <sfrost@snowman.net>)
Список pgsql-hackers
* Stephen Frost (sfrost@snowman.net) wrote:
> * Tom Lane (tgl@sss.pgh.pa.us) wrote:
> > ISTM the first thing we'd need to have before
> > we could think about this rationally is some measurements about the
> > frequencies of different List lengths in a typical workload.
>
> I agree, that'd be a good thing to have.  I'll look into measuring that.

Ok, it took me, uh, a little while to get around to this, but:

http://tamriel.snowman.net/~sfrost/list_histgram.svg

Is what our list lengths look like for the regression tests.  We could
do a pg_bench run, but it looks like Tom's right here- the vast majority
of our lists are small.  Highlights:

63% are 1-element
25% are 2-element

Lists of 4 or fewer elements are 97%
Lists of 8 or fewer elements are 99%

So, when it comes to palloc() reduction, this patch would eliminate 99%
of palloc's due to lists.  For the regression tests, we're talking about
reducing 893,206 palloc calls to only 1.
Thanks,
    Stephen

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

Предыдущее
От: Thom Brown
Дата:
Сообщение: Re: Strange issues with 9.2 pg_basebackup & replication
Следующее
От: Heikki Linnakangas
Дата:
Сообщение: Re: Interrupting long external library calls