Re: Performance issue with Insert

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: "Tomas Vondra" <tv(at)fuzzy(dot)cz>,"Jenish" <jenishvyas(at)gmail(dot)com>
Cc: <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Performance issue with Insert
Date: 2011-06-27 20:56:45
Message-ID: 4E08A83D020000250003EC7B@gw.wicourts.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Jenish <jenishvyas(at)gmail(dot)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

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Denis de Bernardy 2011-06-27 23:00:53 Fw: Getting rid of a seq scan in query on a large table
Previous Message Tomas Vondra 2011-06-27 20:47:35 Re: Performance issue with Insert