Re: Performance issue with Insert - Mailing list pgsql-performance

From Kevin Grittner
Subject Re: Performance issue with Insert
Date
Msg-id 4E08A83D020000250003EC7B@gw.wicourts.gov
Whole thread Raw
In response to Re: Performance issue with Insert  (Jenish <jenishvyas@gmail.com>)
List pgsql-performance
Jenish <jenishvyas@gmail.com> wrote:

> This server is the dedicated database server.
>
> And I am testing the limit for the concurrent active users. When I
> am running my test for 400 concurrent user ie. Active connection.
> I am getting good performance but when I am running the same the
> same test for 950 concurrent users I am getting very bad
> performance.

To serve a large number of concurrent users you need to use a
connection pooler which limits the number of database connections to
a small number.  Typically the most effective number of database
connections is somewhere between the number of actual cores on your
server and twice that plus the number of disk drives.  (It depends
on the details of your hardware and your load.)  The connection
pooler should queue requests which arrive when all database
connections are busy and release them for execution as transactions
complete.  Restricting the active database connections in this way
improves both throughput and latency and will allow you to serve a
much larger number of users without getting into bad performance;
and when you do "hit the wall" performance will degrade more
gracefully.

-Kevin

pgsql-performance by date:

Previous
From: Tomas Vondra
Date:
Subject: Re: Performance issue with Insert
Next
From: Denis de Bernardy
Date:
Subject: Fw: Getting rid of a seq scan in query on a large table