Re: Determining server load
От | John R Pierce |
---|---|
Тема | Re: Determining server load |
Дата | |
Msg-id | 1beac015-29ae-a35d-a86c-4409629223ac@hogranch.com обсуждение исходный текст |
Ответ на | Determining server load (Israel Brewster <israel@ravnalaska.net>) |
Ответы |
Re: Determining server load
|
Список | pgsql-general |
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
В списке pgsql-general по дате отправления: