From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Robert Haas <robertmhaas(at)gmail(dot)com> |
Cc: | Andres Freund <andres(at)anarazel(dot)de>, Craig Ringer <craig(at)postnewspapers(dot)com(dot)au>, Matthew Wakeling <matthew(at)flymine(dot)org>, pgsql-performance(at)postgresql(dot)org |
Subject: | Re: Pooling in Core WAS: Need help in performance tuning. |
Date: | 2010-07-28 05:09:34 |
Message-ID: | 3774.1280293774@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-performance |
Robert Haas <robertmhaas(at)gmail(dot)com> writes:
> On Tue, Jul 27, 2010 at 9:56 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> Other than the fork() cost itself and whatever authentication activity
>> there might be, practically all the startup cost of a new backend can be
>> seen as cache-populating activities. You'd have to redo all of that,
>> *plus* pay the costs of getting rid of the previous cache entries.
>> Maybe the latter costs less than a fork(), or maybe not. fork() is
>> pretty cheap on modern Unixen.
> I agree that the gain is minimal of itself; after all, how often do
> you need to switch databases, and what's the big deal if the
> postmaster has to fork a new backend? Where I see it as a potentially
> big win is when it comes to things like parallel query. I can't help
> thinking that's going to be a lot less efficient if you're forever
> forking new backends.
Color me unconvinced. To do parallel queries with pre-existing worker
processes, you'd need to hook up with a worker that was (at least) in
your own database, and then somehow feed it the query plan that it needs
to execute. I'm thinking fork() could easily be cheaper. But obviously
this is all speculation (... and Windows is going to be a whole 'nother
story in any case ...)
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Craig Ringer | 2010-07-28 05:23:29 | Re: Pooling in Core WAS: Need help in performance tuning. |
Previous Message | Tom Lane | 2010-07-28 04:39:27 | Re: Questions on query planner, join types, and work_mem |