Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id A31036322CA for ; Wed, 8 Sep 2010 16:57:04 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 49589-07 for ; Wed, 8 Sep 2010 19:56:56 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from vexbert.mr-paradox.net (vexbert.mr-paradox.net [198.145.180.174]) by mail.postgresql.org (Postfix) with ESMTP id 6DFFA6341CA for ; Wed, 8 Sep 2010 16:56:57 -0300 (ADT) Received: by vexbert.mr-paradox.net (Postfix, from userid 18391) id AA5F8845EE; Wed, 8 Sep 2010 15:56:54 -0400 (EDT) Date: Wed, 8 Sep 2010 12:56:54 -0700 From: David Kerr To: Greg Smith Cc: Tom Lane , pgsql-performance@postgresql.org Subject: Re: pgbench could not send data to client: Broken pipe Message-ID: <20100908195654.GB49941@mr-paradox.net> References: <20100908174629.GD40339@mr-paradox.net> <8037.1283973026@sss.pgh.pa.us> <4C87E3A6.8060800@2ndquadrant.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4C87E3A6.8060800@2ndquadrant.com> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-10 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201009/32 X-Sequence-Number: 40235 On Wed, Sep 08, 2010 at 03:27:34PM -0400, Greg Smith wrote: - Tom Lane wrote: - >As of the 9.0 release, it's possible to run pgbench in a "multi thread" - >mode, and if you forced the subprocess rather than thread model it looks - >like the select() limit would be per subprocess rather than global. - >So I think you could get above the FD_SETSIZE limit with a bit of - >hacking if you were using 9.0's pgbench. No chance with 8.3 though. - > - - I believe David can do this easily enough by compiling a 9.0 source code - tree with the "--disable-thread-safety" option. That's the simplest way - to force the pgbench client to build itself using the multi-process - model, rather than the multi-threaded one. - - It's kind of futile to run pgbench simulating much more than a hundred - or two clients before 9.0 anyway. Without multiple workers, you're - likely to just run into the process switching limitations within pgbench - itself rather than testing server performance usefully. I've watched - the older pgbench program fail to come close to saturating an 8 core - server without running into its own limitations first. - - You might run a 9.0 pgbench client against an 8.3 server though, if you - did the whole thing starting from pgbench database initialization over - again--the built-in tables like "accounts" changed to "pgbench_accounts" - in 8.4. That might work, can't recall any changes that would prevent - it; but as I haven't tested it yet I can't say for sure. Thanks, I compiled the 9.0 RC1 branch with the --disable-thread-safety option and ran PG bench on my 8.3 DB it seemed to work fine, However, MAXCLIENTS is still 1024, if i hack it to switch it up to 2048 i get this: starting vacuum...end. select failed: Bad file descriptor <--------------- transaction type: TPC-B (sort of) scaling factor: 1 query mode: simple number of clients: 1900 number of threads: 1 number of transactions per client: 10 number of transactions actually processed: 3723/19000 tps = 52.007642 (including connections establishing) tps = 82.579077 (excluding connections establishing) I'm not sure what Tom is referring to with the select(2) limitation, maybe I'm running into it (where do i find that? /usr/include/sys/select.h? ) should i be running pgbench differently? I tried increasing the # of threads but that didn't increase the number of backend's and i'm trying to simulate 2000 physical backend processes. thanks Dave