Re: Parameters for PostgreSQL

From: Craig Ringer <craig(at)postnewspapers(dot)com(dot)au>
To: Jayadevan M <Jayadevan(dot)Maymala(at)ibsplc(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Parameters for PostgreSQL
Date: 2011-08-01 23:57:42
Message-ID: 4E373D76.9020800@postnewspapers.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On 1/08/2011 8:09 PM, Jayadevan M wrote:

> The machine configuration is
> Opteron 2CPU * 4cores @ 2.3GHz
> 16GB RAM
> OS Solaris10 x64

The most important spec has been omitted. What's the storage subsystem?
For most database workloads that's *WAY* more important than the CPUs.

It certainly will be for yours, since your 100GB database won't fit into
16GB of RAM, so you'll be doing a lot of disk I/O.

> Could you please let me know the parameters I should pay attention to?
> Do the settings mentioned above look OK?

There's nothing obviously dangerous like a giant work_mem setting.

Like Oracle, it's very much a matter of tuning to your machine and
workload. Parameters right for one workload will be less than ideal for
another. If at all possible, do some load testing with a dev instance
and tweak based on that.

The most recent book on Pg performance is Greg Smith's "PostgreSQL High
Performance" and it's had very positive comments on this list. It might
be worth a look.

> We are suing weblogic.
^^^^^
Best. Typo. Ever.

I hear most people who use it want to, you're just brave enough to do it :-P

> Should we let weblogic manage the connection pool
> or try something else?

In Glassfish 3.1 and JBoss 7 I let the app server manage the connection
pool. Assuming Weblogic works as well - which I'd hope - you should be
fine doing the same.

PostgreSQL doesn't have any built-in pooling or admission control - each
"connection" is also an executor backend and isn't especially cheap to
have around, so you don't want hundreds and hundreds of them.
If your app hangs on to connections from the pool for a long time, you
might land up wanting to use an external thin pooler like pgpool-II. I
wouldn't worry about anything like this unless you start getting
max_connections exceeded exceptions via your pooler, though, as it
shouldn't be an issue for most EE apps with a container-powered
connection pool.

--
Craig Ringer

POST Newspapers
276 Onslow Rd, Shenton Park
Ph: 08 9381 3088 Fax: 08 9388 2258
ABN: 50 008 917 717
http://www.postnewspapers.com.au/

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Jan Wielgus 2011-08-02 06:22:36 Tsearch2 - bad performance with concatenated ts-vectors
Previous Message Craig Ringer 2011-08-01 23:49:11 Re: synchronous_commit off