Re: pgbench cpu overhead (was Re: lazy vxid locks, v1) - Mailing list pgsql-hackers

From Itagaki Takahiro
Subject Re: pgbench cpu overhead (was Re: lazy vxid locks, v1)
Date
Msg-id BANLkTim5QtvwQ_mPRSUHr07Hn7o2wr03gA@mail.gmail.com
Whole thread Raw
In response to Re: pgbench cpu overhead (was Re: lazy vxid locks, v1)  (Jeff Janes <jeff.janes@gmail.com>)
List pgsql-hackers
On Tue, Jun 14, 2011 at 09:27, Jeff Janes <jeff.janes@gmail.com> wrote:
> pgbench sends each query (per connection) and waits for the reply
> before sending another.

We can use -j option to run pgbench in multiple threads to avoid
request starvation. What setting did you use, Stefan?

>> for those curious - the profile for pgbench looks like:
>> samples  %        symbol name
>> 29378    41.9087  doCustom
>> 17502    24.9672  threadRun
>> 7629     10.8830  pg_strcasecmp

If the bench is bottleneck, it would be better to reduce pg_strcasecmp
calls by holding meta command names as integer values of sub-META_COMMAND
instead of string comparison for each loop.

-- 
Itagaki Takahiro


pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: creating CHECK constraints as NOT VALID
Next
From: Jeff Shanab
Date:
Subject: Libpq in VS 2010