Re: pgbench cpu overhead (was Re: lazy vxid locks, v1)

From: Itagaki Takahiro <itagaki(dot)takahiro(at)gmail(dot)com>
To: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>
Cc: Stefan Kaltenbrunner <stefan(at)kaltenbrunner(dot)cc>, pgsql-hackers(at)postgresql(dot)org, Robert Haas <robertmhaas(at)gmail(dot)com>
Subject: Re: pgbench cpu overhead (was Re: lazy vxid locks, v1)
Date: 2011-06-14 01:46:20
Message-ID: BANLkTim5QtvwQ_mPRSUHr07Hn7o2wr03gA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Jun 14, 2011 at 09:27, Jeff Janes <jeff(dot)janes(at)gmail(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Shigeru Hanada 2011-06-14 01:51:25 Re: FOREIGN TABLE doc fix
Previous Message Alvaro Herrera 2011-06-14 01:41:07 Re: creating CHECK constraints as NOT VALID