Hello.

At Wed, 23 Sep 2020 05:37:24 +0000, "tsunakawa.ta...@fujitsu.com" 
<tsunakawa.ta...@fujitsu.com> wrote in 
> From: Jamison, Kirk/ジャミソン カーク <k.jami...@fujitsu.com>

# Wow. I'm surprised to read it..

> > I revised the patch based from my understanding of Horiguchi-san's comment,
> > but I could be wrong.
> > Quoting:
> > 
> > "
> > +                   /* Get the number of blocks for the supplied relation's
> > fork */
> > +                   nblocks = smgrnblocks(smgr_reln,
> > forkNum[fork_num]);
> > +                   Assert(BlockNumberIsValid(nblocks));
> > +
> > +                   if (nblocks < BUF_DROP_FULLSCAN_THRESHOLD)
> > 
> > As mentioned upthread, the criteria whether we do full-scan or
> > lookup-drop is how large portion of NBUFFERS this relation-drop can be
> > going to invalidate.  So the nblocks above should be the sum of number
> > of blocks to be truncated (not just the total number of blocks) of all
> > designated forks.  Then once we decided to do lookup-drop method, we
> > do that for all forks."
> 
> One takeaway from Horiguchi-san's comment is to use the number of blocks to 
> invalidate for comparison, instead of all blocks in the fork.  That is, use
> 
> nblocks = smgrnblocks(fork) - firstDelBlock[fork];
> 
> Does this make sense?
> 
> What do you think is the reason for summing up all forks?  I didn't 
> understand why.  Typically, FSM and VM forks are very small.  If the main 
> fork is larger than NBuffers / 500, then v14 scans the entire shared buffers 
> for the FSM and VM forks as well as the main fork, resulting in three scans 
> in total.

I thought of summing up smgrnblocks(fork) - firstDelBlock[fork] of all
folks. I don't mind omitting non-main forks but a comment to explain
the reason or reasoning would be needed.

reards.

-- 
Kyotaro Horiguchi
NTT Open Source Software Center


Reply via email to