Re: Pre-alloc ListCell's optimization - Mailing list pgsql-hackers

From Stephen Frost
Subject Re: Pre-alloc ListCell's optimization
Date
Msg-id 20120518211514.GA1267@tamriel.snowman.net
Whole thread Raw
In response to Re: Pre-alloc ListCell's optimization  (Stephen Frost <sfrost@snowman.net>)
Responses Re: Pre-alloc ListCell's optimization
List pgsql-hackers
* Stephen Frost (sfrost@snowman.net) wrote:
> Alright, so I've done some pgbench's using all default configs with just
> a straight up './configure' and pgbench -S -T 300, 3 runs each and then
> averaged:
>
> llist_opt: 9289 tps
> HEAD:      9286 tps

Ok, apparently part of the issue with the previous changes was that the
way copyList() worked it still ended up doing multiple palloc's, and
apparently that's used a lot.  Reworking that gave us a bit more
noticably improvement:

llist_opt: 9407 tps

Which gives us ~1.3% improvment.

The current patch still only pre-alloc's 8 ListCell's, but I've modified
it such that we might be able to use repalloc() to grow that number by 8
(or more..) instead of falling back to the regular palloc() for every
ListCell when we get more than 8 entries.
Thanks,
    Stephen

pgsql-hackers by date:

Previous
From: Joshua Berkus
Date:
Subject: Re: Strange issues with 9.2 pg_basebackup & replication
Next
From: Alvaro Herrera
Date:
Subject: Re: read() returns ERANGE in Mac OS X