Re: Tuning 8.3

From: Gregory Stark <stark(at)enterprisedb(dot)com>
To: "Roberts\, Jon" <Jon(dot)Roberts(at)asurion(dot)com>
Cc: <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Tuning 8.3
Date: 2008-02-25 16:23:39
Message-ID: 87ablp3sz8.fsf@oxford.xeocode.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"Roberts, Jon" <Jon(dot)Roberts(at)asurion(dot)com> writes:

> I need to run about 1000 PostgreSQL connections on a server that I can
> use about 4 GB of the total 16 GB of total RAM. It seems that each
> session creates a process that uses about 15 MB of RAM just for
> connecting so I'm running out of RAM rather quickly.

I think you're being bitten by a different problem than it appears. Windows
has a fixed size per-session shared memory pool which runs out rather quickly.
You can raise that parameter though. (The 125 mentioned there is raised to
about 300 with Pg 8.3.)

See:

http://www.postgresql.org/docs/faqs.FAQ_windows.html#4.4

> Any tips for reducing the memory footprint per session? There is
> pgBouncer but is there anything I can do in the configuration before I
> go with a connection pooler?

I think at 1,000 you're probably into the domain where pgbouncer (or others
like it) is a good idea. Or you could pool or batch at a higher level and have
fewer sessions active at all. You don't win any performance by trying to do
more things simultaneously if they're just competing for cpu timeslices or i/o
bandwidth.

--
Gregory Stark
EnterpriseDB http://www.enterprisedb.com
Get trained by Bruce Momjian - ask me about EnterpriseDB's PostgreSQL training!

In response to

  • Tuning 8.3 at 2008-02-25 15:47:37 from Roberts, Jon

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Roberts, Jon 2008-02-25 16:27:17 Re: Tuning 8.3
Previous Message Gregory Stark 2008-02-25 16:14:19 Re: Questions about indexes with text_pattern_ops