Re: a fast bloat measurement tool (was Re: Measuring relation free space)

From: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
To: Abhijit Menon-Sen <ams(at)2ndquadrant(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>
Subject: Re: a fast bloat measurement tool (was Re: Measuring relation free space)
Date: 2015-04-18 06:58:36
Message-ID: CAA4eK1+XS_Q9cd_e-+r1offEKbJ1kwKZSP+ZB1bVVq68ESjhng@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Apr 3, 2015 at 9:07 PM, Abhijit Menon-Sen <ams(at)2ndquadrant(dot)com>
wrote:
>
> At 2015-03-31 22:43:49 +0530, ams(at)2ndQuadrant(dot)com wrote:
> >
> > I'm just posting this WIP patch where I've renamed fastbloat to
> > pgstatbloat as suggested by Tomas, and added in the documentation, and
> > so on.
>
> Here's the revised version that also adds the count of RECENTLY_DEAD and
> INSERT/DELETE_IN_PROGRESS tuples to the call to vac_estimate_reltuples.
>

I think you have missed to address the below point:

>> 4) prefetch
>>
>> fbstat_heap is using visibility map to skip fully-visible pages,
>> which is nice, but if we skip too many pages it breaks readahead
>> similarly to bitmap heap scan. I believe this is another place where
>> effective_io_concurrency (i.e. prefetch) would be appropriate.
>>

> Good point. We can even think of using the technique used by Vacuum
> which is skip only when we can skip atleast SKIP_PAGES_THRESHOLD
> pages.

Apart from this, one minor point:
+typedef struct pgstatbloat_output_type
+{
+ uint64 table_len;
+ uint64 tuple_count;
+ uint64 misc_count;

misc_count sounds out of place, may be non_live_count?

With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2015-04-18 11:38:44 Re: TABLESAMPLE patch
Previous Message Bruce Momjian 2015-04-18 00:09:02 Re: pg_upgrade in 9.5 broken for adminpack