RE: [Patch] Optimize dropping of relation buffers using dlist

From: "tsunakawa(dot)takay(at)fujitsu(dot)com" <tsunakawa(dot)takay(at)fujitsu(dot)com>
To: "k(dot)jamison(at)fujitsu(dot)com" <k(dot)jamison(at)fujitsu(dot)com>
Cc: 'Kyotaro Horiguchi' <horikyota(dot)ntt(at)gmail(dot)com>, "amit(dot)kapila16(at)gmail(dot)com" <amit(dot)kapila16(at)gmail(dot)com>, "tgl(at)sss(dot)pgh(dot)pa(dot)us" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "andres(at)anarazel(dot)de" <andres(at)anarazel(dot)de>, "robertmhaas(at)gmail(dot)com" <robertmhaas(at)gmail(dot)com>, "tomas(dot)vondra(at)2ndquadrant(dot)com" <tomas(dot)vondra(at)2ndquadrant(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: RE: [Patch] Optimize dropping of relation buffers using dlist
Date: 2020-10-20 07:06:58
Message-ID: TYAPR01MB2990071B4A97DB899D5C93CCFE1F0@TYAPR01MB2990.jpnprd01.prod.outlook.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

From: Jamison, Kirk/ジャミソン カーク <k(dot)jamison(at)fujitsu(dot)com>
> However, I still can't seem to find the cause of why the non-recovery
> performance does not change when compared to master. (1 min 15 s for the
> given test case below)

Can you check and/or try the following?

1. Isn't the vacuum cost delay working?
VACUUM command should run without sleeping with the default settings. Just in case, can you try with the settings:

vacuum_cost_delay = 0
vacuum_cost_limit = 10000

2. Buffer strategy
The non-recovery VACUUM can differ from that of recovery in the use of shared buffers. The VACUUM command uses only 256 KB of shared buffers. To make VACUUM command use the whole shared buffers, can you modify src/backend/commands/vacuum.c so that GetAccessStrategy()'s argument is changed to BAS_VACUUM to BAS_NORMAL? (I don't have much hope about this, though, because all blocks of the relations are already cached in shared buffers when VACUUM is run.)

Can you measure the time DropRelFileNodeBuffers()? You can call GetTimestamp() at the beginning and end of the function, and use TimestampDifference() to calculate the difference. Then, for instance, elog(WARNING, "time is | %u.%u", sec, usec) at the end of the function. You can use any elog() print format for your convenience to write shell commands to filter the lines and sum up the total.

Regards
Takayuki Tsunakawa

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Masahiro Ikeda 2020-10-20 07:11:29 Re: Add statistics to pg_stat_wal view for wal related parameter tuning
Previous Message Andy Fan 2020-10-20 07:05:29 Re: Wired if-statement in gen_partprune_steps_internal