Re: a fast bloat measurement tool (was Re: Measuring relation free space)
От | Amit Kapila |
---|---|
Тема | Re: a fast bloat measurement tool (was Re: Measuring relation free space) |
Дата | |
Msg-id | CAA4eK1+XS_Q9cd_e-+r1offEKbJ1kwKZSP+ZB1bVVq68ESjhng@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: a fast bloat measurement tool (was Re: Measuring relation free space) (Abhijit Menon-Sen <ams@2ndQuadrant.com>) |
Ответы |
Re: a fast bloat measurement tool (was Re: Measuring
relation free space)
|
Список | pgsql-hackers |
On Fri, Apr 3, 2015 at 9:07 PM, Abhijit Menon-Sen <ams@2ndquadrant.com> wrote:
>
> At 2015-03-31 22:43:49 +0530, ams@2ndQuadrant.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:
>
> At 2015-03-31 22:43:49 +0530, ams@2ndQuadrant.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.
>>
>>
>> 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?
В списке pgsql-hackers по дате отправления: