Re: Pre-alloc ListCell's optimization

From: Stephen Frost <sfrost(at)snowman(dot)net>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Pre-alloc ListCell's optimization
Date: 2012-05-18 21:15:14
Message-ID: 20120518211514.GA1267@tamriel.snowman.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

* Stephen Frost (sfrost(at)snowman(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2012-05-18 21:18:57 Re: read() returns ERANGE in Mac OS X
Previous Message Joshua Berkus 2012-05-18 17:44:41 Re: Strange issues with 9.2 pg_basebackup & replication