pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: David Kerr <dmk@mr-paradox.net>
Cc: pgsql-performance@postgresql.org
Subject: Re: pgbench could not send data to client: Broken pipe
Date: Wed, 08 Sep 2010 15:10:26 -0400
Message-ID: <8037.1283973026@sss.pgh.pa.us> (raw)
In-Reply-To: <20100908174629.GD40339@mr-paradox.net>
References: <20100908174629.GD40339@mr-paradox.net>

David Kerr <dmk@mr-paradox.net> writes:
> I'm running pgbench with a fairly large # of clients and getting this error in my PG log file.
> LOG:  could not send data to client: Broken pipe

That error suggests that pgbench dropped the connection.  You might be
running into some bug or internal limitation in pgbench.  Did you check
to make sure pgbench isn't crashing?

> (I had to modify the pgbench.c file to make it go that high, i changed:
> MAXCLIENTS = 2048

Hm, you can't just arbitrarily change that number; it has to be less
than whatever number of open files select(2) supports.  A look on my
Fedora 13 box suggests that 1024 is the limit there; I'm not sure which
Red Hat variant you're using but I suspect it might have the same limit.

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.

(This suggests BTW that we might want to expose the thread-versus-fork
choice in a slightly more user-controllable fashion, rather than
assuming that threads are always better.)

			regards, tom lane



view thread (19+ messages)  latest in thread

Message-ID: <8037.1283973026@sss.pgh.pa.us>
Permalink:  ../8037.1283973026@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/8037.1283973026@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: tgl@sss.pgh.pa.us, dmk@mr-paradox.net
  Subject: Re: pgbench could not send data to client: Broken pipe
  In-Reply-To: <8037.1283973026@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox