posgres tunning

Started by Arnaldo Gandolover 18 years ago6 messagesgeneral
Jump to latest
#1Arnaldo Gandol
agacode@gmail.com

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?

#2Michael Fuhr
mike@fuhr.org
In reply to: Arnaldo Gandol (#1)
Re: posgres tunning

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

#3Gavin M. Roy
gmr@myyearbook.com
In reply to: Arnaldo Gandol (#1)
Re: posgres tunning

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.

Show quoted text

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?

#4Phoenix Kiula
phoenix.kiula@gmail.com
In reply to: Gavin M. Roy (#3)
Re: posgres tunning

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!

#5Gavin M. Roy
gmr@myyearbook.com
In reply to: Phoenix Kiula (#4)
Re: posgres tunning

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.

Show quoted text

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

#6Phoenix Kiula
phoenix.kiula@gmail.com
In reply to: Gavin M. Roy (#5)
Re: posgres tunning

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!