Re: Improve catcache/syscache performance.

From: Jesper Pedersen <jesper(dot)pedersen(at)redhat(dot)com>
To: Andres Freund <andres(at)anarazel(dot)de>, pgsql-hackers(at)postgresql(dot)org
Cc: tushar <tushar(dot)ahuja(at)enterprisedb(dot)com>
Subject: Re: Improve catcache/syscache performance.
Date: 2017-09-26 13:24:14
Message-ID: 6921cef2-4c69-d764-d376-406c41e73e92@redhat.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 09/26/2017 06:41 AM, tushar wrote:
> On 09/22/2017 11:45 AM, Andres Freund wrote:
>> Here's a variant that cleans up the previous changes a bit, and adds
>> some further improvements:
>
> I tested with different pgbench options with  master v/s patch and found
> an improvement.  I have applied 001 and 003 patch on PG Head ,patch 0002
> was already committed.
>
> Virtual Machine configuration - Centos 6.5 x64 / 16 GB RAM / 8 VCPU core
> processor
>
> Scaling factor=30
>
> pgbench -M prepared -T 200 postgres
>
> PG Head       -  tps = 902.225954 (excluding connections establishing).
> PG HEAD+patch -  tps = 1001.896381 (10.97+% vs. head)
>
>
> pgbench -M prepared -T 300 postgres
>
> PG Head       -  tps = 920.108333 (excluding connections establishing).
> PG HEAD+patch -  tps = 1023.89542 (11.19+% vs. head)
>
> pgbench -M prepared -T 500 postgres
>
> PG Head       -  tps = 995.178227 (excluding connections establishing)
> PG HEAD+patch -  tps = 1078.32222 (+8.34% vs. head)
>
>
> Later I modified the create_many_cols.sql file (previously attached) and
> instead of
> only using int  , I mixed it with varchar/int4/numeric/float and run
> pgbench
> with different time duration
>
>
> pgbench -M prepared -f /tmp/pgbench-many-cols.sql -T 300  postgres
>
> PG Head       -  tps =  5540.143877 (excluding connections establishing).
> PG HEAD+patch -  tps =  5679.713493 (2.50+% vs. head)
>
>
> pgbench -M prepared -f /tmp/pgbench-many-cols.sql -T 500  postgres
>
> PG Head       -  tps = 5519.212709 (excluding connections establishing).
> PG HEAD+patch -  tps = 5967.059155 (8.11+% vs. head)
>
>
> pgbench -M prepared -f /tmp/pgbench-many-cols.sql -T 700  postgres
>
> PG Head       -  tps = 5640.314495(excluding connections establishing).
> PG HEAD+patch -  tps = 6012.223147 (6.59+% vs. head)
>

I'm also seeing a speedup on a 2S/28C/56T/256Gb + 2 x RAID10 SSD machine
using -M prepared, -M prepared -N and -M prepared -S scenarios with
various scale factors, and custom queries.

Small typo in 0002- / commit 791961:

diff --git a/src/include/utils/hashutils.h b/src/include/utils/hashutils.h
index 35281689e8..366bd0e78b 100644
--- a/src/include/utils/hashutils.h
+++ b/src/include/utils/hashutils.h
@@ -22,7 +22,7 @@ hash_combine(uint32 a, uint32 b)

/*
- * Simple inline murmur hash implementation hashing a 32 bit ingeger, for
+ * Simple inline murmur hash implementation hashing a 32 bit integer, for
* performance.
*/
static inline uint32

Best regards,
Jesper

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2017-09-26 13:40:10 Re: Page Scan Mode in Hash Index
Previous Message Jesper Pedersen 2017-09-26 13:00:47 Re: path toward faster partition pruning