From: | Shaun Thomas <sthomas(at)optionshouse(dot)com> |
---|---|
To: | Niels Kristian Schjødt <nielskristian(at)autouncle(dot)com> |
Cc: | Kevin Grittner <kgrittn(at)mail(dot)com>, Willem Leenen <willem_leenen(at)hotmail(dot)com>, <pgsql-performance(at)postgresql(dot)org> |
Subject: | Re: Optimize update query |
Date: | 2012-11-30 13:49:08 |
Message-ID: | 50B8B954.7060807@optionshouse.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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(at)optionshouse(dot)com
______________________________________________
See http://www.peak6.com/email_disclaimer/ for terms and conditions related to this email
From | Date | Subject | |
---|---|---|---|
Next Message | Shaun Thomas | 2012-11-30 14:02:39 | Re: Optimize update query |
Previous Message | Niels Kristian Schjødt | 2012-11-30 13:31:34 | Re: Optimize update query |