Re: What does "[backends] should seldom or never need to wait for a write to occur" mean?

2020-11-16 Thread Bruce Momjian
On Thu, Nov 12, 2020 at 12:37:30PM -0500, Bruce Momjian wrote: > On Thu, Nov 12, 2020 at 05:25:30PM +, Chris Wilson wrote: > > Hi Bruce, > > > > Thanks, I absolutely agree that this documentation needs to explain properly > > how the bgwriter works. Your latest patch looks good, it significant

Re: What does "[backends] should seldom or never need to wait for a write to occur" mean?

2020-11-12 Thread Chris Wilson
Hi Bruce, Thanks, I absolutely agree that this documentation needs to explain properly how the bgwriter works. Your latest patch looks good, it significantly improves this section of the manual. I would just suggest changing "non-dirty" to "clean" in "When the number of non-dirty shared buffers ap

Re: What does "[backends] should seldom or never need to wait for a write to occur" mean?

2020-11-12 Thread Bruce Momjian
On Thu, Nov 12, 2020 at 05:25:30PM +, Chris Wilson wrote: > Hi Bruce, > > Thanks, I absolutely agree that this documentation needs to explain properly > how the bgwriter works. Your latest patch looks good, it significantly > improves > this section of the manual. I would just suggest changin

Re: What does "[backends] should seldom or never need to wait for a write to occur" mean?

2020-11-12 Thread Bruce Momjian
On Thu, Nov 12, 2020 at 02:40:04PM +, Chris Wilson wrote: > Hi Bruce, > > Thanks, yes I agree that that is much clearer. However when you say: > > > When the percentage of dirty shared buffers is high, the background writer > writes some of them to the file system... > > > I haven'

Re: What does "[backends] should seldom or never need to wait for a write to occur" mean?

2020-11-12 Thread Chris Wilson
Hi Bruce, Thanks, yes I agree that that is much clearer. However when you say: When the percentage of dirty shared buffers is high, the background writer > writes some of them to the file system... I haven't seen anything about a minimum percentage before the bgwriter kicks in, is that really t

Re: What does "[backends] should seldom or never need to wait for a write to occur" mean?

2020-11-11 Thread Bruce Momjian
On Wed, Nov 11, 2020 at 11:29:09AM +, Chris Wilson wrote: > I still believe that my original proposed change, to "This reduces the chances > that a backend needing an empty buffer must [itself] write a dirty one back to > disk before evicting it" (with one extra word added), resolves the ambigu

Re: What does "[backends] should seldom or never need to wait for a write to occur" mean?

2020-11-11 Thread Chris Wilson
Hi Bruce, Thanks, but I think it's more ambiguous than that. I was trying to discover how the bgwriter works in order to tune it successfully (to identify the correct tuning objectives). It's not documented anywhere else in the official docs that I can find, so this is the canonical place to learn

Re: What does "[backends] should seldom or never need to wait for a write to occur" mean?

2020-11-10 Thread Bruce Momjian
On Mon, Nov 9, 2020 at 08:36:32PM -0500, Bruce Momjian wrote: > On Tue, Nov 3, 2020 at 06:11:21PM +, Chris Wilson wrote: > > Hi all, > > > > I did some more research and found this explanation in a presentation by > > 2ndQuadrant: > > > > > > When a process wants a buffer, it asks Buff

Re: What does "[backends] should seldom or never need to wait for a write to occur" mean?

2020-11-09 Thread Bruce Momjian
On Tue, Nov 3, 2020 at 06:11:21PM +, Chris Wilson wrote: > Hi all, > > I did some more research and found this explanation in a presentation by > 2ndQuadrant: > > > When a process wants a buffer, it asks BufferAlloc for the file/block. If > the block is already cached, it gets pinne

Re: What does "[backends] should seldom or never need to wait for a write to occur" mean?

2020-11-03 Thread Chris Wilson
Hi all, I did some more research and found this explanation in a presentation by 2ndQuadrant : When a process wants a buffer, it asks BufferAlloc for the file/block. If > the block is already ca

Re: What does "[backends] should seldom or never need to wait for a write to occur" mean?

2020-11-02 Thread Chris Wilson
Hi all, Thanks Thomas. When the bgwriter flushes (cleans) a dirty Postgres buffer, it generates a write() syscall of its own, which I think must increase the number of dirty cache buffers in the Linux kernel (temporarily, until it actually flushes those cache buffers to disk). Therefore it tempor

Re: What does "[backends] should seldom or never need to wait for a write to occur" mean?

2020-11-01 Thread Thomas Munro
On Fri, Oct 30, 2020 at 11:24 AM PG Doc comments form wrote: > The following documentation comment has been logged on the website: > > Page: https://www.postgresql.org/docs/13/runtime-config-resource.html > Description: > > https://www.postgresql.org/docs/13/runtime-config-resource.html#RUNTIME-CO

Re: What does "[backends] should seldom or never need to wait for a write to occur" mean?

2020-10-29 Thread David G. Johnston
On Thu, Oct 29, 2020 at 3:24 PM PG Doc comments form wrote: > The following documentation comment has been logged on the website: > > Page: https://www.postgresql.org/docs/13/runtime-config-resource.html > Description: > > > https://www.postgresql.org/docs/13/runtime-config-resource.html#RUNTIME-

What does "[backends] should seldom or never need to wait for a write to occur" mean?

2020-10-29 Thread PG Doc comments form
The following documentation comment has been logged on the website: Page: https://www.postgresql.org/docs/13/runtime-config-resource.html Description: https://www.postgresql.org/docs/13/runtime-config-resource.html#RUNTIME-CONFIG-RESOURCE-BACKGROUND-WRITER says: "There is a separate server proc