Re: Thousands of parallel connections - Mailing list pgsql-general

From Tom Lane
Subject Re: Thousands of parallel connections
Date
Msg-id 24083.1092702728@sss.pgh.pa.us
Whole thread Raw
In response to Thousands of parallel connections  (Peter Eisentraut <peter_e@gmx.net>)
Responses Re: Thousands of parallel connections  (Chris Travers <chris@travelamericas.com>)
List pgsql-general
Chris Travers <chris@metatrontech.com> writes:
> Tom Lane wrote:
>> That does not add up: the graph can't have a negative y-intercept.
>> There should be a substantial cost to run the postmaster at all,
>> and then an essentially fixed cost per connection --- assuming
>> that all the connections are running similar queries, of course.
>> You're telling us the first 40 connections require zero RAM.

> That is strange.  Is it really linear or does the cost go up somewhat
> after the first few?

Well, if you have significant contention problems then the speed could
be worse than linear --- but he was talking about memory usage.  AFAICS,
a backend doing a particular query should need X amount of RAM pretty
much independently of how many others there are.  The only data structure
I can think of that would be impacted at all is QuerySnapshot, and at
4 bytes per sibling backend it's *way* down in the noise...

            regards, tom lane

pgsql-general by date:

Previous
From: "Glen Parker"
Date:
Subject: pg_clog and pg_xlog empty, postgresql refuses to start
Next
From: Chris Travers
Date:
Subject: Re: Thousands of parallel connections