max client limit in pgbench - Mailing list pgsql-hackers

From Tatsuo Ishii
Subject max client limit in pgbench
Date
Msg-id 20070825.115011.38695476.t-ishii@sraoss.co.jp
Whole thread Raw
Responses Re: max client limit in pgbench  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
I found following in pgbench.c:

#define MAXCLIENTS 1024            /* max number of clients allowed */

This is used for calculating the upper limit of -c option. However
actual limit is coming from the number of descriptors that select(2)
can watch (besides the number of file descriptors allowed by the
kernal. This is different story though, I think). So it seems the line
would be better looking at FD_SETSIZE in select.h.

Included is the proposed patch. Comments?
--
Tatsuo Ishii
SRA OSS, Inc. Japan

*** pgbench.c    22 Aug 2007 23:03:27 -0000    1.70
--- pgbench.c    25 Aug 2007 02:49:34 -0000
***************
*** 53,59 **** /********************************************************************  * some configurable parameters */

! #define MAXCLIENTS 1024            /* max number of clients allowed */  int            nclients = 1;        /*
defaultnumber of simulated clients */ int            nxacts = 10;        /* default number of transactions per clients
*/
--- 53,64 ---- /********************************************************************  * some configurable parameters */

! /* max number of clients allowed */
! #ifdef FD_SETSIZE
! #define MAXCLIENTS     FD_SETSIZE
! #else
! #define MAXCLIENTS     1024
! #endif  int            nclients = 1;        /* default number of simulated clients */ int            nxacts = 10;
  /* default number of transactions per clients */
 



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Testing the other tsearch dictionaries
Next
From: Tom Lane
Date:
Subject: Re: max client limit in pgbench