max client limit in pgbench

From: Tatsuo Ishii <ishii(at)postgresql(dot)org>
To: pgsql-hackers(at)postgresql(dot)org
Subject: max client limit in pgbench
Date: 2007-08-25 02:50:11
Message-ID: 20070825.115011.38695476.t-ishii@sraoss.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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; /* default number 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 */

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2007-08-25 03:05:02 Re: max client limit in pgbench
Previous Message Tom Lane 2007-08-25 02:43:28 Testing the other tsearch dictionaries