Search Postgresql Archives

Re: Determining server load

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 9/27/2016 9:54 AM, Israel Brewster wrote:

I did look at pgbadger, which tells me I have gotten as high as 62 connections/second, but given that most of those connections are probably very short lived that doesn't really tell me anything about concurrent connections.

Each connection requires a process fork of the database server, which is very expensive. you might consider using a connection pool such as pgbouncer, to maintain a fixed(dynamic) number of real database connections, and have your apps connect/disconnect to this pool. Obviously, you need a pool for each database, and your apps need to be 'stateless' and not make or rely on any session changes to the connection so they don't interfere with each other. Doing this correctly can make an huge performance improvement on the sort of apps that do (connect, transaction, disconnect) a lot.



--
john r pierce, recycling bits in santa cruz



--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux