Thread: Hot Issue
Hi all,
We have upgraded our database server to postgres 8.3.1 on 28th June.
Checked out the performance of Hot on 30th June :
Checked the performance of Hot on 2nd July :
Performance of Hot was much better on 30June as compared to 2nd July.
Can anybody , help out over here.
~ Gauri
--
Regards
Gauri
We have upgraded our database server to postgres 8.3.1 on 28th June.
Checked out the performance of Hot on 30th June :
relname | n_tup_ins | n_tup_upd | n_tup_del | n_tup_hot_upd | n_live_tup | n_dead_tup |
table1 | 15509156 | 2884653 | 0 | 2442823 | 15509158 | 68046 |
table2 | 434585 | 718472 | 0 | 642336 | 434703 | 16723 |
table3 | 105546 | 252143 | 0 | 233078 | 105402 | 4922 |
table4 | 7303628 | 96098 | 176790 | 23445 | 7126838 | 3443 |
table5 | 11117045 | 22245 | 0 | 16910 | 11117045 | 440 |
Checked the performance of Hot on 2nd July :
relname | n_tup_ins | n_tup_upd | n_tup_del | n_tup_hot_upd | n_live_tup | n_dead_tup |
table1 | 15577724 | 6237242 | 0 | 2924948 | 18460676 | 131103 |
table2 | 435558 | 1579613 | 0 | 763397 | 1171497 | 42476 |
table3 | 105814 | 540997 | 0 | 273443 | 355287 | 14184 |
table4 | 7614752 | 219329 | 513268 | 41053 | 7424721 | 62 |
table5 | 11184309 | 47665 | 0 | 21198 | 11206296 | 745 |
Can anybody , help out over here.
~ Gauri
relname | n_tup_ins | n_tup_upd | n_tup_del | n_tup_hot_upd | n_live_tup | n_dead_tup |
--
Regards
Gauri
On Wed, Jul 2, 2008 at 8:31 AM, Gauri Kanekar <meetgaurikanekar@gmail.com> wrote: > Performance of Hot was much better on 30June as compared to 2nd July. Did you happen to VACUUM FULL or CLUSTER anything? -- Jonah H. Harris, Sr. Software Architect | phone: 732.331.1324 EnterpriseDB Corporation | fax: 732.331.1301 499 Thornall Street, 2nd Floor | jonah.harris@enterprisedb.com Edison, NJ 08837 | http://www.enterprisedb.com/
No, Vacuum Full was not done, but auto_vacuum did click onto table1.
No cluster.
--
Regards
Gauri
No cluster.
On Wed, Jul 2, 2008 at 6:10 PM, Jonah H. Harris <jonah.harris@gmail.com> wrote:
On Wed, Jul 2, 2008 at 8:31 AM, Gauri KanekarDid you happen to VACUUM FULL or CLUSTER anything?
<meetgaurikanekar@gmail.com> wrote:
> Performance of Hot was much better on 30June as compared to 2nd July.
--
Jonah H. Harris, Sr. Software Architect | phone: 732.331.1324
EnterpriseDB Corporation | fax: 732.331.1301
499 Thornall Street, 2nd Floor | jonah.harris@enterprisedb.com
Edison, NJ 08837 | http://www.enterprisedb.com/
--
Regards
Gauri
On Wed, 2008-07-02 at 18:01 +0530, Gauri Kanekar wrote: > Checked out the performance of Hot on 30th June : > > relname n_tup_ins n_tup_upd n_tup_del > n_tup_hot_upd > n_live_tup n_dead_tup *table1* *15509156* *2884653* *0* *2442823* > * > 15509158* *68046* table2 434585 718472 0 642336 434703 16723 table3 > 105546 > 252143 0 233078 105402 4922 <snip> > > Checked the performance of Hot on 2nd July : > > relname n_tup_ins n_tup_upd n_tup_del > n_tup_hot_upd > n_live_tup n_dead_tup *table1**15577724* *6237242* *0* *2924948* > * > 18460676* *131103* table2 435558 1579613 0 763397 1171497 42476 Maybe those updates were not qualified for HOT between these days? Regards, -- Devrim GÜNDÜZ devrim~gunduz.org, devrim~PostgreSQL.org, devrim.gunduz~linux.org.tr http://www.gunduz.org
Attachment
How does it indicate if the entries qualify for hot update ??
hot have a limitation that it do not work if, the index column is updated. But that not the case over here.
On Wed, Jul 2, 2008 at 6:38 PM, Devrim GÜNDÜZ <devrim@gunduz.org> wrote:
On Wed, 2008-07-02 at 18:01 +0530, Gauri Kanekar wrote:<snip>
> Checked out the performance of Hot on 30th June :
>
> relname n_tup_ins n_tup_upd n_tup_del
> n_tup_hot_upd
> n_live_tup n_dead_tup *table1* *15509156* *2884653* *0* *2442823*
> *
> 15509158* *68046* table2 434585 718472 0 642336 434703 16723 table3
> 105546
> 252143 0 233078 105402 4922>Maybe those updates were not qualified for HOT between these days?
> Checked the performance of Hot on 2nd July :
>
> relname n_tup_ins n_tup_upd n_tup_del
> n_tup_hot_upd
> n_live_tup n_dead_tup *table1**15577724* *6237242* *0* *2924948*
> *
> 18460676* *131103* table2 435558 1579613 0 763397 1171497 42476
Regards,
--
Devrim GÜNDÜZ
devrim~gunduz.org, devrim~PostgreSQL.org, devrim.gunduz~linux.org.tr
http://www.gunduz.org
--
Regards
Gauri
On Wed, Jul 2, 2008 at 9:11 AM, Gauri Kanekar <meetgaurikanekar@gmail.com> wrote: > hot have a limitation that it do not work if, the index column is updated. > But that not the case over here. Another limitation is that HOT won't work if there's not enough space to fit the update on the same page. -- Jonah H. Harris, Sr. Software Architect | phone: 732.331.1324 EnterpriseDB Corporation | fax: 732.331.1301 499 Thornall Street, 2nd Floor | jonah.harris@enterprisedb.com Edison, NJ 08837 | http://www.enterprisedb.com/
On Wed, 2008-07-02 at 18:41 +0530, Gauri Kanekar wrote: > hot have a limitation that it do not work if, the index column is > updated. It is one of the conditions -- it also needs to fit in the same block. Regards, -- Devrim GÜNDÜZ devrim~gunduz.org, devrim~PostgreSQL.org, devrim.gunduz~linux.org.tr http://www.gunduz.org
Attachment
ok.. But we have set fill_factor = 80 for all the indexes on table1.
Is there a way to check if the page is fill and the update is going on a new page ??
--
Regards
Gauri
Is there a way to check if the page is fill and the update is going on a new page ??
On Wed, Jul 2, 2008 at 6:59 PM, Jonah H. Harris <jonah.harris@gmail.com> wrote:
On Wed, Jul 2, 2008 at 9:11 AM, Gauri KanekarAnother limitation is that HOT won't work if there's not enough space
<meetgaurikanekar@gmail.com> wrote:
> hot have a limitation that it do not work if, the index column is updated.
> But that not the case over here.
to fit the update on the same page.
--Jonah H. Harris, Sr. Software Architect | phone: 732.331.1324
EnterpriseDB Corporation | fax: 732.331.1301
499 Thornall Street, 2nd Floor | jonah.harris@enterprisedb.com
Edison, NJ 08837 | http://www.enterprisedb.com/
--
Regards
Gauri
On Wed, Jul 2, 2008 at 9:44 AM, Gauri Kanekar <meetgaurikanekar@gmail.com> wrote: > ok.. But we have set fill_factor = 80 for all the indexes on table1. You need fill factor for the heap table, not the index. > Is there a way to check if the page is fill and the update is going on a new > page ?? IIRC, I don't think so. I think you'd have to u se something like pg_filedump to see if you have rows migrated to other blocks due to updates. -- Jonah H. Harris, Sr. Software Architect | phone: 732.331.1324 EnterpriseDB Corporation | fax: 732.331.1301 499 Thornall Street, 2nd Floor | jonah.harris@enterprisedb.com Edison, NJ 08837 | http://www.enterprisedb.com/
"Jonah H. Harris" <jonah.harris@gmail.com> writes: > On Wed, Jul 2, 2008 at 9:44 AM, Gauri Kanekar >> Is there a way to check if the page is fill and the update is going on a new >> page ?? > IIRC, I don't think so. You could make your application check to see if the page part of a row's CTID changes when it's updated. But there's no centralized counter other than the one you are already looking at. I personally found the original post completely content-free, however, since it gave no context for the two sets of numbers we were shown. Over what intervals were the counts accumulated? Were the stats counters reset after taking the first output, or does the second output include the first? What exactly does the OP think that "better HOT performance" is, anyway? regards, tom lane
2nd count include the 1st count also.
We have not restarted the DB since postgres 8.3 have been released.
Better HOT performance means.... 1st stat showed most of the updated tuples getting hot.
But the 2nd stat showed that most of the updated tuples are NOT getting hot.
On Wed, Jul 2, 2008 at 8:10 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> Is there a way to check if the page is fill and the update is going on a newYou could make your application check to see if the page part of a row's
>> page ??
> IIRC, I don't think so.
CTID changes when it's updated. But there's no centralized counter
other than the one you are already looking at.
I personally found the original post completely content-free, however,
since it gave no context for the two sets of numbers we were shown.
Over what intervals were the counts accumulated? Were the stats
counters reset after taking the first output, or does the second output
include the first? What exactly does the OP think that "better HOT
performance" is, anyway?
regards, tom lane
--
Regards
Gauri
"Gauri Kanekar" <meetgaurikanekar@gmail.com> writes: > Better HOT performance means.... 1st stat showed most of the updated tuples > getting hot. > But the 2nd stat showed that most of the updated tuples are NOT getting hot. Well, as was noted upthread, you'd want to reduce the table fillfactor (not index fillfactor) below 100 to improve the odds of being able to do HOT updates. But I wonder whether your application behavior changed. Are you updating the rows in a way that'd make them wider? regards, tom lane