Thread: Optimized pgbench for 8.3

Optimized pgbench for 8.3

From
ITAGAKI Takahiro
Date:
The attached is a patch to optimize contrib/pgbench using new 8.3 features.

- Use DROP IF EXISTS to suppress errors for initial loadings.
- Use a combination of TRUNCATE and COPY to reduce WAL on creating
  the accounts table.

Also, there are some cosmetic changes.

- Change the output of -v option from "starting full vacuum..."
  to "starting vacuum accounts..." in reflection of the fact.
- Shape duplicated error checks into executeStatement().


There is a big performance win in "COPY with no WAL" feature.
Thanks for the efforts!

Regards,
---
ITAGAKI Takahiro
NTT Open Source Software Center

Attachment

Re: Optimized pgbench for 8.3

From
Bruce Momjian
Date:
Your patch has been added to the PostgreSQL unapplied patches list at:

    http://momjian.postgresql.org/cgi-bin/pgpatches

It will be applied as soon as one of the PostgreSQL committers reviews
and approves it.

---------------------------------------------------------------------------


ITAGAKI Takahiro wrote:
> The attached is a patch to optimize contrib/pgbench using new 8.3 features.
>
> - Use DROP IF EXISTS to suppress errors for initial loadings.
> - Use a combination of TRUNCATE and COPY to reduce WAL on creating
>   the accounts table.
>
> Also, there are some cosmetic changes.
>
> - Change the output of -v option from "starting full vacuum..."
>   to "starting vacuum accounts..." in reflection of the fact.
> - Shape duplicated error checks into executeStatement().
>
>
> There is a big performance win in "COPY with no WAL" feature.
> Thanks for the efforts!
>
> Regards,
> ---
> ITAGAKI Takahiro
> NTT Open Source Software Center

[ Attachment, skipping... ]

>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: don't forget to increase your free space map settings

--
  Bruce Momjian  <bruce@momjian.us>          http://momjian.us
  EnterpriseDB                               http://www.enterprisedb.com

  + If your life is a hard drive, Christ can be your backup. +

Re: Optimized pgbench for 8.3

From
Bruce Momjian
Date:
Tatsuo, would you please comment on this patch?

---------------------------------------------------------------------------

ITAGAKI Takahiro wrote:
> The attached is a patch to optimize contrib/pgbench using new 8.3 features.
>
> - Use DROP IF EXISTS to suppress errors for initial loadings.
> - Use a combination of TRUNCATE and COPY to reduce WAL on creating
>   the accounts table.
>
> Also, there are some cosmetic changes.
>
> - Change the output of -v option from "starting full vacuum..."
>   to "starting vacuum accounts..." in reflection of the fact.
> - Shape duplicated error checks into executeStatement().
>
>
> There is a big performance win in "COPY with no WAL" feature.
> Thanks for the efforts!
>
> Regards,
> ---
> ITAGAKI Takahiro
> NTT Open Source Software Center

[ Attachment, skipping... ]

>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: don't forget to increase your free space map settings

--
  Bruce Momjian  <bruce@momjian.us>          http://momjian.us
  EnterpriseDB                               http://www.enterprisedb.com

  + If your life is a hard drive, Christ can be your backup. +

Re: Optimized pgbench for 8.3

From
Tatsuo Ishii
Date:
> Tatsuo, would you please comment on this patch?

Sure. I will come up with a comment by the end of this week.
--
Tatsuo Ishii
SRA OSS, Inc. Japan

> ---------------------------------------------------------------------------
>
> ITAGAKI Takahiro wrote:
> > The attached is a patch to optimize contrib/pgbench using new 8.3 features.
> >
> > - Use DROP IF EXISTS to suppress errors for initial loadings.
> > - Use a combination of TRUNCATE and COPY to reduce WAL on creating
> >   the accounts table.
> >
> > Also, there are some cosmetic changes.
> >
> > - Change the output of -v option from "starting full vacuum..."
> >   to "starting vacuum accounts..." in reflection of the fact.
> > - Shape duplicated error checks into executeStatement().
> >
> >
> > There is a big performance win in "COPY with no WAL" feature.
> > Thanks for the efforts!
> >
> > Regards,
> > ---
> > ITAGAKI Takahiro
> > NTT Open Source Software Center
>
> [ Attachment, skipping... ]
>
> >
> > ---------------------------(end of broadcast)---------------------------
> > TIP 5: don't forget to increase your free space map settings
>
> --
>   Bruce Momjian  <bruce@momjian.us>          http://momjian.us
>   EnterpriseDB                               http://www.enterprisedb.com
>
>   + If your life is a hard drive, Christ can be your backup. +

Re: Optimized pgbench for 8.3

From
Tatsuo Ishii
Date:
> > Tatsuo, would you please comment on this patch?
>
> Sure. I will come up with a comment by the end of this week.

The patches look good to me.

BTW, is anybody working on enabling the fill factor to the tables used
by pgbench? 8.3 will introduce HOT, and I think adding the feature
will make it easier to test HOT.
--
Tatsuo Ishii
SRA OSS, Inc. Japan

> > ---------------------------------------------------------------------------
> >
> > ITAGAKI Takahiro wrote:
> > > The attached is a patch to optimize contrib/pgbench using new 8.3 features.
> > >
> > > - Use DROP IF EXISTS to suppress errors for initial loadings.
> > > - Use a combination of TRUNCATE and COPY to reduce WAL on creating
> > >   the accounts table.
> > >
> > > Also, there are some cosmetic changes.
> > >
> > > - Change the output of -v option from "starting full vacuum..."
> > >   to "starting vacuum accounts..." in reflection of the fact.
> > > - Shape duplicated error checks into executeStatement().
> > >
> > >
> > > There is a big performance win in "COPY with no WAL" feature.
> > > Thanks for the efforts!
> > >
> > > Regards,
> > > ---
> > > ITAGAKI Takahiro
> > > NTT Open Source Software Center
> >
> > [ Attachment, skipping... ]
> >
> > >
> > > ---------------------------(end of broadcast)---------------------------
> > > TIP 5: don't forget to increase your free space map settings
> >
> > --
> >   Bruce Momjian  <bruce@momjian.us>          http://momjian.us
> >   EnterpriseDB                               http://www.enterprisedb.com
> >
> >   + If your life is a hard drive, Christ can be your backup. +

Re: Optimized pgbench for 8.3

From
Tom Lane
Date:
Tatsuo Ishii <ishii@postgresql.org> writes:
> The patches look good to me.

Please commit whatever you think is reasonable.

> BTW, is anybody working on enabling the fill factor to the tables used
> by pgbench? 8.3 will introduce HOT, and I think adding the feature
> will make it easier to test HOT.

I'm not 100% sure that HOT will make it ... but I agree that it'd be
useful for pgbench to support different fillfactor choices.  Please
add if you have time.

            regards, tom lane

Re: Optimized pgbench for 8.3

From
Tatsuo Ishii
Date:
Patch committed. Thanks.
--
Tatsuo Ishii
SRA OSS, Inc. Japan

> The attached is a patch to optimize contrib/pgbench using new 8.3 features.
>
> - Use DROP IF EXISTS to suppress errors for initial loadings.
> - Use a combination of TRUNCATE and COPY to reduce WAL on creating
>   the accounts table.
>
> Also, there are some cosmetic changes.
>
> - Change the output of -v option from "starting full vacuum..."
>   to "starting vacuum accounts..." in reflection of the fact.
> - Shape duplicated error checks into executeStatement().
>
>
> There is a big performance win in "COPY with no WAL" feature.
> Thanks for the efforts!
>
> Regards,
> ---
> ITAGAKI Takahiro
> NTT Open Source Software Center

Re: Optimized pgbench for 8.3

From
Bruce Momjian
Date:
FYI, patch applied by Tatsuo.  Thanks.

---------------------------------------------------------------------------

ITAGAKI Takahiro wrote:
> The attached is a patch to optimize contrib/pgbench using new 8.3 features.
>
> - Use DROP IF EXISTS to suppress errors for initial loadings.
> - Use a combination of TRUNCATE and COPY to reduce WAL on creating
>   the accounts table.
>
> Also, there are some cosmetic changes.
>
> - Change the output of -v option from "starting full vacuum..."
>   to "starting vacuum accounts..." in reflection of the fact.
> - Shape duplicated error checks into executeStatement().
>
>
> There is a big performance win in "COPY with no WAL" feature.
> Thanks for the efforts!
>
> Regards,
> ---
> ITAGAKI Takahiro
> NTT Open Source Software Center

[ Attachment, skipping... ]

>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: don't forget to increase your free space map settings

--
  Bruce Momjian  <bruce@momjian.us>          http://momjian.us
  EnterpriseDB                               http://www.enterprisedb.com

  + If your life is a hard drive, Christ can be your backup. +

Re: [HACKERS] Optimized pgbench for 8.3

From
"Pavan Deolasee"
Date:

On 4/6/07, Tatsuo Ishii <ishii@postgresql.org> wrote:

BTW, is anybody working on enabling the fill factor to the tables used
by pgbench? 8.3 will introduce HOT, and I think adding the feature
will make it easier to test HOT.


Please see if the attached patch looks good. It adds a new -F option
which can be used to set fillfactor for tellers, accounts and branches
tables. Default is 100 and anything between 10 and 100 is acceptable.

Thanks,
Pavan

--

EnterpriseDB     http://www.enterprisedb.com
Attachment

Re: [HACKERS] Optimized pgbench for 8.3

From
Tatsuo Ishii
Date:
Patch committed. Thanks.
--
Tatsuo Ishii
SRA OSS, Inc. Japan

> On 4/6/07, Tatsuo Ishii <ishii@postgresql.org> wrote:
> >
> >
> > BTW, is anybody working on enabling the fill factor to the tables used
> > by pgbench? 8.3 will introduce HOT, and I think adding the feature
> > will make it easier to test HOT.
> >
> >
> Please see if the attached patch looks good. It adds a new -F option
> which can be used to set fillfactor for tellers, accounts and branches
> tables. Default is 100 and anything between 10 and 100 is acceptable.
>
> Thanks,
> Pavan
>
> --
>
> EnterpriseDB     http://www.enterprisedb.com