pg.ddx.io pgsql-performance@postgresql.org mailing list archive
help / color / mirror / Atom feedDynamically loaded C function performance
3+ messages / 3 participants
[nested] [flat]
* Dynamically loaded C function performance
@ 2006-05-05 22:47 Adam Palmblad <apalmblad@dataunison.com>
0 siblings, 1 reply; 3+ messages in thread
From: Adam Palmblad @ 2006-05-05 22:47 UTC (permalink / raw)
To: pgsql-performance
Hi,
We've got a C function that we use here and we find that for every
connection, the first run of the function is much slower than any
subsequent runs. ( 50ms compared to 8ms)
Besides using connection pooling, are there any options to improve
performance?
-Adam
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Dynamically loaded C function performance
@ 2006-05-11 22:05 Jim C. Nasby <jnasby@pervasive.com>
parent: Adam Palmblad <apalmblad@dataunison.com>
0 siblings, 1 reply; 3+ messages in thread
From: Jim C. Nasby @ 2006-05-11 22:05 UTC (permalink / raw)
To: Adam Palmblad <apalmblad@dataunison.com>; +Cc: pgsql-performance
On Fri, May 05, 2006 at 03:47:53PM -0700, Adam Palmblad wrote:
> Hi,
> We've got a C function that we use here and we find that for every
> connection, the first run of the function is much slower than any
> subsequent runs. ( 50ms compared to 8ms)
>
> Besides using connection pooling, are there any options to improve
> performance?
In my experience, connection startup takes a heck of a lot longer than
50ms, so why are you worrying about 50ms for the first run of a
function?
BTW, sorry, but I don't know a way to speed this up, either.
--
Jim C. Nasby, Sr. Engineering Consultant jnasby@pervasive.com
Pervasive Software http://pervasive.com work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Dynamically loaded C function performance
@ 2006-05-11 22:49 Joe Conway <mail@joeconway.com>
parent: Jim C. Nasby <jnasby@pervasive.com>
0 siblings, 0 replies; 3+ messages in thread
From: Joe Conway @ 2006-05-11 22:49 UTC (permalink / raw)
To: Jim C. Nasby <jnasby@pervasive.com>; +Cc: Adam Palmblad <apalmblad@dataunison.com>; pgsql-performance
Jim C. Nasby wrote:
> On Fri, May 05, 2006 at 03:47:53PM -0700, Adam Palmblad wrote:
>
>>Hi,
>>We've got a C function that we use here and we find that for every
>>connection, the first run of the function is much slower than any
>>subsequent runs. ( 50ms compared to 8ms)
>>
>>Besides using connection pooling, are there any options to improve
>>performance?
>
> In my experience, connection startup takes a heck of a lot longer than
> 50ms, so why are you worrying about 50ms for the first run of a
> function?
>
> BTW, sorry, but I don't know a way to speed this up, either.
I think Tom nailed the solution already in a nearby reply -- see
preload_libraries on this page:
http://www.postgresql.org/docs/8.1/interactive/runtime-config-resource.html
Joe
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2006-05-11 22:49 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2006-05-05 22:47 Dynamically loaded C function performance Adam Palmblad <apalmblad@dataunison.com>
2006-05-11 22:05 ` Jim C. Nasby <jnasby@pervasive.com>
2006-05-11 22:49 ` Joe Conway <mail@joeconway.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox