Re: Optimize update query - Mailing list pgsql-performance

From Shaun Thomas
Subject Re: Optimize update query
Date
Msg-id 50B8B954.7060807@optionshouse.com
Whole thread Raw
In response to Re: Optimize update query  (Niels Kristian Schjødt <nielskristian@autouncle.com>)
List pgsql-performance
On 11/30/2012 07:31 AM, Niels Kristian Schjødt wrote:

> In theory what difference should it make to the performance, to have
> a pool in front of the database, that all my workers and web servers
> connect to instead of connecting directly? Where is the performance
> gain coming from in that situation?

If you have several more connections than you have processors, the
database does a *lot* more context switching, and among other things,
that drastically reduces PG performance. On a testbed, I can get over
150k transactions per second on PG 9.1 with a 1-1 relationship between
CPU and client. Increase that to a few hundred, and my TPS drops down to
30k. Simply having the clients there kills performance.


--
Shaun Thomas
OptionsHouse | 141 W. Jackson Blvd. | Suite 500 | Chicago IL, 60604
312-444-8534
sthomas@optionshouse.com

______________________________________________

See http://www.peak6.com/email_disclaimer/ for terms and conditions related to this email


pgsql-performance by date:

Previous
From: Niels Kristian Schjødt
Date:
Subject: Re: Optimize update query
Next
From: Shaun Thomas
Date:
Subject: Re: Optimize update query