Thread: posgres tunning

posgres tunning

From
"Arnaldo Gandol"
Date:
  I have a drupal site working with postgres that does not tolerate more than 200 concurrent connections(it is not hardware fault). Does anybody know how to adjust postgres parameters and what are them?, or how to get a better performance in any way?

Re: posgres tunning

From
Michael Fuhr
Date:
On Sat, Jul 21, 2007 at 09:54:35PM -0500, Arnaldo Gandol wrote:
>  I have a drupal site working with postgres that does not tolerate more
> than 200 concurrent connections(it is not hardware fault).

What does "not tolerate" mean?  Does the database refuse connections
beyond 200?  Does it permit connections but performance suffers?  Or
something else?

> Does anybody know how to adjust postgres parameters and what are them?,
> or how to get a better performance in any way?

We'll need to know more about the nature of the problem before we
can make recommendations.  For configuration guidelines see the
performance-related documents at Power PostgreSQL:

http://www.powerpostgresql.com/Docs

--
Michael Fuhr

Re: posgres tunning

From
"Gavin M. Roy"
Date:
You might want to look at pgBouncer to pool your drupal pgsql needs.  I've found with 2000 needed connections, I can pool out to only 30 backends and still push 8k transactions per second.

On 7/21/07, Arnaldo Gandol <agacode@gmail.com> wrote:
  I have a drupal site working with postgres that does not tolerate more than 200 concurrent connections(it is not hardware fault). Does anybody know how to adjust postgres parameters and what are them?, or how to get a better performance in any way?

Re: posgres tunning

From
"phoenix.kiula@gmail.com"
Date:
On Jul 23, 5:18 am, g...@myyearbook.com ("Gavin M. Roy") wrote:
> You might want to look at pgBouncer to pool your drupal pgsql needs.  I've
> found with 2000 needed connections, I can pool out to only 30 backends and
> still push 8k transactions per second.
>



How you do use pgBouncer -- through an application developed in PHP or
Perl? It would be lovely if you can share some info about this
seemingly useful app which comes with so little documentation on how
to actually get using. The Skype site mentions the install bits, but
not how to actually query the pgBouncer stuff instead of the database.
Very hard to come by some actual code. Could you please share some?
Many thanks!


Re: posgres tunning

From
"Phoenix Kiula"
Date:
On 19/08/07, Gavin M. Roy <gmr@myyearbook.com> wrote:
> We use PHP, but think of it as a universal PgSQL proxy..  If you connect to
> a connection you setup in pgBouncer via psql, it looks like a normal
> database.   Nothing is different in your code but where you connect (for us,
> it's the same as our core DB server on a different server).  Let me know if
> that answers your question, would be happy to elaborate further if needed.



Thanks much Gavin. That's useful info. Is it easy to set up without
breaking a live, production pgsql environment? I don't mind a quick
restart but significant downtime may not be an option.

I guess this may be too much, but would you have some PHP code you
could share? I like the idea of connecting to pgbouncer as though it
were a db, but it's unclear how that would get me to my tables in my
real db?

TIA!

Re: posgres tunning

From
"Gavin M. Roy"
Date:
We use PHP, but think of it as a universal PgSQL proxy..  If you connect to a connection you setup in pgBouncer via psql, it looks like a normal database.   Nothing is different in your code but where you connect (for us, it's the same as our core DB server on a different server).  Let me know if that answers your question, would be happy to elaborate further if needed.

On 8/19/07, phoenix.kiula@gmail.com <phoenix.kiula@gmail.com > wrote:
On Jul 23, 5:18 am, g...@myyearbook.com ("Gavin M. Roy") wrote:
> You might want to look at pgBouncer to pool your drupal pgsql needs.  I've
> found with 2000 needed connections, I can pool out to only 30 backends and
> still push 8k transactions per second.
>



How you do use pgBouncer -- through an application developed in PHP or
Perl? It would be lovely if you can share some info about this
seemingly useful app which comes with so little documentation on how
to actually get using. The Skype site mentions the install bits, but
not how to actually query the pgBouncer stuff instead of the database.
Very hard to come by some actual code. Could you please share some?
Many thanks!


---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend