From: | Andres Freund <andres(at)anarazel(dot)de> |
---|---|
To: | Robert Haas <robertmhaas(at)gmail(dot)com> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Jeevan Ladhe <jeevan(dot)ladhe(at)enterprisedb(dot)com>, PostgreSQL Developers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Binary search in fmgr_isbuiltin() is a bottleneck. |
Date: | 2017-09-27 19:40:04 |
Message-ID: | 20170927194004.kqjxtanchjsaisjq@alap3.anarazel.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 2017-09-27 15:30:45 -0400, Robert Haas wrote:
> On Wed, Sep 27, 2017 at 1:40 PM, Andres Freund <andres(at)anarazel(dot)de> wrote:
> > I don't think you can even measure the overhead of building the
> > table. This is inserting ~8k rows in an accurately sized hashtable - a
> > vanishingly small amount of time in comparison to the backend startup
> > time (and even more so postmaster startup). My measurement shows it
> > takes about 0.4 ms to build (gdb in, query, reset oid2builtins = 0,
> > query - repeat a couple times).
>
> 0.4ms isn't negligible as a fraction of backend startup time, is it?
Well, on linux you'd only have this on postmaster startup.
> I think backend startup time is a few milliseconds.
>
> $ echo '\set x 1' > x.txt
> $ pgbench -n -C -c 1 -f x.txt -T 10
> transaction type: x.txt
> scaling factor: 1
> query mode: simple
> number of clients: 1
> number of threads: 1
> duration: 10 s
> number of transactions actually processed: 5091
> latency average = 1.965 ms
> tps = 508.866931 (including connections establishing)
> tps = 12909.303693 (excluding connections establishing)
I had tried this with an actual simplistic query, and the difference was
either nonexistant, or below in the noise. I didn't do a pgbench run
that doesn't actually do anything in the backend - doesn't seem like a
meaningful thing to measure?
Greetings,
Andres Freund
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2017-09-27 19:50:05 | Re: Binary search in fmgr_isbuiltin() is a bottleneck. |
Previous Message | Robert Haas | 2017-09-27 19:30:45 | Re: Binary search in fmgr_isbuiltin() is a bottleneck. |