Prepare enabled pgbench

Started by Curtis Faithabout 23 years ago11 messages
#1Curtis Faith
curtis@galtair.com

Tatsuo, are you or anyone else working on adding PREPARE, EXECUTE support to
pgbench?

If not, I can do it myself and if you are interested, I'll send you the
patch.

- Curtis

#2Tatsuo Ishii
t-ishii@sra.co.jp
In reply to: Curtis Faith (#1)
Re: Prepare enabled pgbench

Tatsuo, are you or anyone else working on adding PREPARE, EXECUTE support to
pgbench?

As far as I know, no one is working on that.

If not, I can do it myself and if you are interested, I'll send you the
patch.

Thanks. I can commit it for 7.4. BTW, it would be nice if we could
have a switch to turn on/off PREPARE/EXECUTE in pgbench so that we
could see how PRPARE/EXECUTE could improve the performance...
--
Tatsuo Ishii

#3Bruce Momjian
pgman@candle.pha.pa.us
In reply to: Tatsuo Ishii (#2)
Re: Prepare enabled pgbench

Tatsuo Ishii wrote:

Tatsuo, are you or anyone else working on adding PREPARE, EXECUTE support to
pgbench?

As far as I know, no one is working on that.

If not, I can do it myself and if you are interested, I'll send you the
patch.

Thanks. I can commit it for 7.4. BTW, it would be nice if we could
have a switch to turn on/off PREPARE/EXECUTE in pgbench so that we
could see how PRPARE/EXECUTE could improve the performance...

We could probably just run before-after patch tests to see the
performance change. I am afraid adding that switch into the code may
make it messy.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073
#4Tatsuo Ishii
t-ishii@sra.co.jp
In reply to: Bruce Momjian (#3)
Re: Prepare enabled pgbench

Thanks. I can commit it for 7.4. BTW, it would be nice if we could
have a switch to turn on/off PREPARE/EXECUTE in pgbench so that we
could see how PRPARE/EXECUTE could improve the performance...

We could probably just run before-after patch tests to see the
performance change. I am afraid adding that switch into the code may
make it messy.

But one of the purposes of pgbench is examining performance on
different environments, doesn't it? I'm afraid hard coded
PREPARE/EXECUTE makes it harder.
--
Tatsuo Ishii

#5Bruce Momjian
pgman@candle.pha.pa.us
In reply to: Tatsuo Ishii (#4)
Re: Prepare enabled pgbench

Tatsuo Ishii wrote:

Thanks. I can commit it for 7.4. BTW, it would be nice if we could
have a switch to turn on/off PREPARE/EXECUTE in pgbench so that we
could see how PRPARE/EXECUTE could improve the performance...

We could probably just run before-after patch tests to see the
performance change. I am afraid adding that switch into the code may
make it messy.

But one of the purposes of pgbench is examining performance on
different environments, doesn't it? I'm afraid hard coded
PREPARE/EXECUTE makes it harder.

I was just thinking that pgbench is for measuring code changes, not for
testing changes _in_ pgbench. Once we know the performance difference
for PERFORM, would we still keep the code in pgbench? Maybe to test
later, I guess.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073
#6Tatsuo Ishii
t-ishii@sra.co.jp
In reply to: Bruce Momjian (#5)
Re: Prepare enabled pgbench

But one of the purposes of pgbench is examining performance on
different environments, doesn't it? I'm afraid hard coded
PREPARE/EXECUTE makes it harder.

I was just thinking that pgbench is for measuring code changes, not for
testing changes _in_ pgbench. Once we know the performance difference
for PERFORM, would we still keep the code in pgbench? Maybe to test
later, I guess.

My concern is PREPARE/EXECUTE may NOT always improve the
performance. I guess we have very few data to judge PREPARE/EXECUTE is
good or not. Moreover PREPARE/EXECUTE might be improved in the
future. If that happens, keeping that switch would help examining the
effect, no?
--
Tatsuo Ishii

#7Bruce Momjian
pgman@candle.pha.pa.us
In reply to: Tatsuo Ishii (#6)
Re: Prepare enabled pgbench

Tatsuo Ishii wrote:

But one of the purposes of pgbench is examining performance on
different environments, doesn't it? I'm afraid hard coded
PREPARE/EXECUTE makes it harder.

I was just thinking that pgbench is for measuring code changes, not for
testing changes _in_ pgbench. Once we know the performance difference
for PERFORM, would we still keep the code in pgbench? Maybe to test
later, I guess.

My concern is PREPARE/EXECUTE may NOT always improve the
performance. I guess we have very few data to judge PREPARE/EXECUTE is
good or not. Moreover PREPARE/EXECUTE might be improved in the
future. If that happens, keeping that switch would help examining the
effect, no?

It would. I was just concerned that having both in there would be a
maintenance headache and would perhaps double the amount of code and
make it complicated. Let see what the author does and we can decide
then.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073
#8Tatsuo Ishii
t-ishii@sra.co.jp
In reply to: Bruce Momjian (#7)
Re: Prepare enabled pgbench

My concern is PREPARE/EXECUTE may NOT always improve the
performance. I guess we have very few data to judge PREPARE/EXECUTE is
good or not. Moreover PREPARE/EXECUTE might be improved in the
future. If that happens, keeping that switch would help examining the
effect, no?

It would. I was just concerned that having both in there would be a
maintenance headache and would perhaps double the amount of code and
make it complicated. Let see what the author does and we can decide
then.

Ok.
--
Tatsuo Ishii

#9Tom Lane
tgl@sss.pgh.pa.us
In reply to: Tatsuo Ishii (#2)
Re: Prepare enabled pgbench

Tatsuo Ishii <t-ishii@sra.co.jp> writes:

Thanks. I can commit it for 7.4. BTW, it would be nice if we could
have a switch to turn on/off PREPARE/EXECUTE in pgbench so that we
could see how PRPARE/EXECUTE could improve the performance...

That is a *must*. Otherwise, you've simply made an arbitrary change
in the benchmark ... which is no benchmark at all.

regards, tom lane

#10Curtis Faith
curtis@galtair.com
In reply to: Tom Lane (#9)
Re: Prepare enabled pgbench

Tatsuo Ishii <t-ishii@sra.co.jp> writes:

Thanks. I can commit it for 7.4. BTW, it would be nice if we could
have a switch to turn on/off PREPARE/EXECUTE in pgbench so that we
could see how PRPARE/EXECUTE could improve the performance...

tom lane replies:

That is a *must*. Otherwise, you've simply made an arbitrary change
in the benchmark ... which is no benchmark at all.

regards, tom lane

I will add it as a switched option.

It should be possible to keep most of the code common for the two cases.

- Curtis

#11Justin Clift
justin@postgresql.org
In reply to: Curtis Faith (#10)
Re: Prepare enabled pgbench

Hi Curtis,

Have you had time to get this done?

:-)

Regards and best wishes,

Justin Clift

Curtis Faith wrote:

Tatsuo Ishii <t-ishii@sra.co.jp> writes:

Thanks. I can commit it for 7.4. BTW, it would be nice if we could
have a switch to turn on/off PREPARE/EXECUTE in pgbench so that we
could see how PRPARE/EXECUTE could improve the performance...

tom lane replies:

That is a *must*. Otherwise, you've simply made an arbitrary change
in the benchmark ... which is no benchmark at all.

regards, tom lane

I will add it as a switched option.

It should be possible to keep most of the code common for the two cases.

- Curtis

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org

--
"My grandfather once told me that there are two kinds of people: those
who work and those who take the credit. He told me to try to be in the
first group; there was less competition there."
- Indira Gandhi