Re: WIP: Avoid creation of the free space map for small tables

From: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
To: John Naylor <jcnaylor(at)gmail(dot)com>, Mithun Cy <mithun(dot)cy(at)enterprisedb(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: WIP: Avoid creation of the free space map for small tables
Date: 2018-12-31 03:49:37
Message-ID: CAA4eK1KYtNFkYQ9oTgf2bUNXvA3ectLQuAWLUh2wKVHLEuiiJQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sun, Dec 30, 2018 at 3:49 AM John Naylor <jcnaylor(at)gmail(dot)com> wrote:
>
> On 12/29/18, Mithun Cy <mithun(dot)cy(at)enterprisedb(dot)com> wrote:
> > Results are execution time(unit ms) taken by copy statement when number of
> > records equal to exact number which fit HEAP_FSM_CREATION_THRESHOLD = 4
> > pages. For fill factor 20 it is till tid (3, 43) and for scale factor 70
> > till tid (3, 157). Result is taken as a median of 10 runs.
>
> > So 2-3% consistent regression, And on every run I can see for patch v11
> > execution time is slightly more than base.
>

Have you by any chance checked at scale factor 80 or 100?

> Thanks for testing!
>
> > I also tried to insert more
> > records till 8 pages and same regression is observed! So I guess even
> > HEAP_FSM_CREATION_THRESHOLD = 4 is not perfect!
>
> That's curious, because once the table exceeds the threshold, it would
> be allowed to update the FSM, and in the process write 3 pages that it
> didn't have to in the 4 page test. The master branch has the FSM
> already, so I would expect the 8 page case to regress more.
>

It is not clear to me why you think there should be regression at 8
pages when HEAP_FSM_CREATION_THRESHOLD is 4. Basically, once FSM
starts getting updated, we should be same as HEAD as it won't take any
special path?

> What I can do later is provide a supplementary patch to go on top of
> mine that only checks the last block. If that improves performance,
> I'll alter my patch to only check every other page.
>

Sure, but I guess first we should try to see what is exactly slowing
down via perf report.

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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Mithun Cy 2018-12-31 03:59:24 Re: WIP: Avoid creation of the free space map for small tables
Previous Message Chapman Flack 2018-12-31 03:23:55 doc: where best to add ~ 400 words to the manual?