Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TeQxu-0008JP-OF for pgsql-performance@arkaria.postgresql.org; Fri, 30 Nov 2012 13:49:14 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1TeQxt-0005ze-VC for pgsql-performance@arkaria.postgresql.org; Fri, 30 Nov 2012 13:49:14 +0000 Received: from makus.postgresql.org ([98.129.198.125]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TeQxs-0005zY-O8 for pgsql-performance@postgresql.org; Fri, 30 Nov 2012 13:49:12 +0000 Received: from smtp2.peak6.com ([38.98.137.9]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TeQxr-0004mz-5a for pgsql-performance@postgresql.org; Fri, 30 Nov 2012 13:49:12 +0000 X-AuditID: 0a02cb20-b7f1a6d00000797a-b8-50b8b95501c7 Received: from sswchi5pcas2.peak6.net (sswchi5pcas2.peak6.net [10.100.13.24]) by smtp2.peak6.com (Symantec Messaging Gateway) with SMTP id 4E.A2.31098.559B8B05; Fri, 30 Nov 2012 07:49:09 -0600 (CST) Received: from [10.10.201.64] (10.10.201.64) by sswchi5pcas2.peak6.net (10.100.13.25) with Microsoft SMTP Server (TLS) id 14.2.247.3; Fri, 30 Nov 2012 07:49:09 -0600 Message-ID: <50B8B954.7060807@optionshouse.com> Date: Fri, 30 Nov 2012 07:49:08 -0600 From: Shaun Thomas Reply-To: Organization: Peak6 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/20121028 Thunderbird/16.0.2 MIME-Version: 1.0 To: =?ISO-8859-1?Q?Niels_Kristian_Schj=F8dt?= CC: Kevin Grittner , Willem Leenen , Subject: Re: Optimize update query References: <20121130120359.69330@gmx.com> In-Reply-To: Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Length: 1015 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [10.10.201.64] X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrMKsWRmVeSWpSXmKPExsXClcIroRu6c0eAwYEj5hYvj91htli66yyL xfWZ55gtdq7by+LA4tF5+Dyrx+OeM2weM56cZvW4sG8aewBLVAOjTWJeXn5JYkmqQkpqcbKt kn9BSWZ+XrFHfmlxqoJLZnFyTmJmbmqRkkJmiq2SsZJCQU5icmpual6JrVJiQUFqXoqSHZcC BrABKsvMU0jNS85PycxLt1XyDPbXtbAwtdQ1VLKLRwYJnSwZFy+9Yy+4z1bx/ukclgbGLaxd jJwcEgImEi+/TGKCsMUkLtxbz9bFyMUhJHCCUWLB5NWsEM5KRonf/2exg1TxCuhLXFvzmwXE ZhFQlXjSOZsRxGYT0JWY1L+CDcQWElCR6Dt7A2wqv4CwxL4PTcwgtqhAmMSaPYeYIOYISpyc +QRoDgeHiIC3xK+WBJAws0CZxMTHj8GOExbQkWjadJ0VYmS8ROPRFjCbU8BRor/pCjtEva3E hTnXWSBseYnmrbOZIepVJVY0T2SDeExB4v+Vd0wTGEVmIdk8C0n7LCTtCxiZVzGKF5clJmdk mhUU55YUGOkVpCZmm+nlpZZsYgSlBKbTCjsYN/dYHWIU4GBU4uFdsGh7gBBrYllxZe4hRgkO ZiUR3r8bdwQI8aYkVlalFuXHF5XmpBYfYvQBBtlEZinR5HxgusoriTc0NjUwtTQ1NDU3NTTC IawkzhsauihASCAdmHyyU1MLUotgxjFxcEo1MIqE/HDZulODyVf81fm65/v5heqWP+j/9Gma 1ZzdrYzu5bbbD8QaWnjWS/qf4uzz4bDV9cn9pXdd5mkHK1OkscmJE+X7j1xbY3wkO+63Cvcz 8/rX0+bEy9rF/Vx76Ewr//tp/D6fZydYmggI3llnF+rG4Jo8Z7rS0+8v/8fECj7ZtjfwHuvO J0osxRmJhlrMRcWJABaBV0Q2AwAA X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-performance Precedence: bulk Sender: pgsql-performance-owner@postgresql.org On 11/30/2012 07:31 AM, Niels Kristian Schj=F8dt 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 --=20 Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance