Re: freebsd 5.2 and max_connections - Mailing list pgsql-performance

From Richard Huxton
Subject Re: freebsd 5.2 and max_connections
Date
Msg-id 200401131713.42682.dev@archonet.com
Whole thread Raw
In response to freebsd 5.2 and max_connections  (David Hill <davidh@wmis.net>)
List pgsql-performance
On Tuesday 13 January 2004 16:04, David Hill wrote:
> Hello -
> I am using postgresql to hold aliases, users, and relay_domains for postfix
> and courier to do lookups from.  I am not storing mail in sql.
>
> I need postgresql to have fast read performance, so i setup index's on the
> tables.  Also, the queries are basically "select blah from table where
> domain='domain.com'";, so i dont need to be able to support large results.
>
> I will  have a lot of mail servers connecting to this postgresql db, so i
> need to support a lot of connections... but dont need to support large
> results.

Firstly - if you don't know about the tuning guidelines/annotated config file,
you should go here:
http://www.varlena.com/varlena/GeneralBits/Tidbits/index.php

Hmm - small result sets accessed directly via indexed fields, so sort_mem
probably isn't important to you.

Make sure your effective cache setting is accurate though, so PG can estimate
whether it'll need to access the disks.

Not sure if clustering one or more tables will help - I'm guessing not. What
might help is to increase the statistics gathered on important columns. That
should give the planner a more accurate estimate of value distribution and
shouldn't cost you too much to keep accurate, since I'm guessing a low rate
of updating.

You might want to play with the random page cost (?or is it random access
cost?) but more RAM for a bigger disk cache is probably the simplest tweak.

--
  Richard Huxton
  Archonet Ltd

pgsql-performance by date:

Previous
From: David Hill
Date:
Subject: freebsd 5.2 and max_connections
Next
From: mallah@trade-india.com
Date:
Subject: Re: COUNT & Pagination