Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TTK2Q-00019Z-7H for pgsql-performance@postgresql.org; Tue, 30 Oct 2012 22:11:58 +0000 Received: from nm5-vm4.bullet.mail.ne1.yahoo.com ([98.138.91.165]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TTK2O-0007ET-95 for pgsql-performance@postgresql.org; Tue, 30 Oct 2012 22:11:57 +0000 Received: from [98.138.226.176] by nm5.bullet.mail.ne1.yahoo.com with NNFMP; 30 Oct 2012 22:11:55 -0000 Received: from [98.138.226.163] by tm11.bullet.mail.ne1.yahoo.com with NNFMP; 30 Oct 2012 22:11:55 -0000 Received: from [127.0.0.1] by omp1064.mail.ne1.yahoo.com with NNFMP; 30 Oct 2012 22:11:55 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 92779.33845.bm@omp1064.mail.ne1.yahoo.com Received: (qmail 24722 invoked by uid 60001); 30 Oct 2012 22:11:55 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1351635115; bh=dB2qxPPIN2N+9QkftnY131SMIFySOU5tduFiKwrIcT0=; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:Cc:In-Reply-To:MIME-Version:Content-Type; b=cxRSME61K28H+g8KA+TeFmTfrrwKjbltqGb99fVKZ5QNz8BitG6HNAk8anvHN0Ak2dNGQZXwgbJVQaSEApqH/uKooWxOmZIOt4fTV7eok7EJTFTgnVEl8usXywYOjDnhHyxq7Y8h7kOnDGK4gEo86RxVPRDE0NnGHm0U6mxTT9A= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:Cc:In-Reply-To:MIME-Version:Content-Type; b=l3eMxC/AAQ5d+AaMbTBHkzNRpSPFtvm0E8KkRPR5EVn+68CMDd6wvKxhd7c4zeMJkr/sziBg/os0/+yRBkixsVZe3K2tcdg8vHafcOhCpIgAoGUCMOzkaIBFlit3Geq92gPqVMSvi12m55DhAAtl8a/xDB7LloglsPf9zNG918M=; X-YMail-OSG: sIChU2oVM1nuixr_HL.3T8qrohD2BVDUAuXH8UX6PQnRzsP u2vbFJ9i2toDSzNkmy_C56mbuY6s.AW2JJZ8VPoJ4wNpRfOHk8zZhJy7IyA7 kvsRQTalu23OUylr4FIMeCHfMZQt1YhYCZvk99uMPQiKiHBBXUC5jlf_vFBG b2NV_2vOxrddVc065iQ8JNrYeVgmgO5JrjeC4yIWfnFtRzUHO0VfYRs8CfgY mv210p6Ba6IEhNzwANi7HS7B4cKWx0M.WWD_34Adzrgr8tAU6Al_UDBQLMKW 9W_qu2ULI.Q.BELSkGBjQ4A5tjP.K6moWGuLD7nBA.w6X6m1SISzgkQE8uYO MjKlYFn79yF3R4Q1p4tgXopzDESCleGYQ2ypsg_f2TPggVEY9S9BcX9VLWp6 XNYQoRSxCNxe9J6wRUf7He9WaGHd8IypVFz1ctDoZoRxwMIUQxZLvywynNcK hhjvbkR7rl_2t9aN769jouuQjSv9kAJXVminyhtQT8.Gysw-- Received: from [199.9.251.45] by web125906.mail.ne1.yahoo.com via HTTP; Tue, 30 Oct 2012 15:11:54 PDT X-Rocket-MIMEInfo: 001.001, SmVmZiAvIENhdGFsaW4gLS0KCkplZmYgSmFuZXMgd3JvdGU6Cgo.T24gTW9uLCBPY3QgMjksIDIwMTIgYXQgNToxMSBQTSwgQ2F0YWxpbiBJYWNvYiA8aWFjb2JjYXRhbGluQGdtYWlsLmNvbT4gd3JvdGU6Cj4KPj4gcGdib3VuY2VyIDEuNC4yIGluc3RhbGxlZCBmcm9tIFVidW50dSdzIHBhY2thZ2VzIG9uIHRoZSBzYW1lIG1hY2hpbmUKPj4gYXMgUG9zdGdyZXMuIERqYW5nbyBjb25uZWN0cyB2aWEgVENQL0lQIHRvIHBnYm91bmNlciAoaXQgZG9lcyBvbmUKPj4gY29ubmVjdGlvbiBhbmQgb25lIHRyYW5zYWMBMAEBAQE- X-Mailer: YahooMailWebService/0.8.123.460 References: Message-ID: <1351635114.18993.YahooMailNeo@web125906.mail.ne1.yahoo.com> Date: Tue, 30 Oct 2012 15:11:54 -0700 (PDT) From: Greg Williamson Reply-To: Greg Williamson Subject: Re: How to keep queries low latency as concurrency increases Cc: "pgsql-performance@postgresql.org" In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Pg-Spam-Score: 0.3 (/) X-Archive-Number: 201210/391 X-Sequence-Number: 48350 Jeff / Catalin -- Jeff Janes wrote: >On Mon, Oct 29, 2012 at 5:11 PM, Catalin Iacob wrote: > >> pgbouncer 1.4.2 installed from Ubuntu's packages on the same machine >> as Postgres. Django connects via TCP/IP to pgbouncer (it does one >> connection and one transaction per request) and pgbouncer keeps >> connections open to Postgres via Unix socket. > >Isn't pgbouncer single-threaded? > >If you hitting it with tiny queries as fast as possible from 20 >connections, I would think that it would become the bottleneck. > >Cheers, > I'm sure pgbouncer has some threshold where it breaks down, but we have servers (postgres 8.4 and 9.1) with connections from runtime (fed via haproxy) to pgbouncer that routinely have tens of thousands of connections in but only 40-70 postgres connections to the postgres cluster itself. Mix of queries but most are simple. Typically a few thousand queries a second to the readonly boxes, about the same to a beefier read / write master. This is a slightly old pgbouncer at that ... used is a fairly basic mode. Greg Williamson