Re: Bgwriter strategies - Mailing list pgsql-hackers

From Pavan Deolasee
Subject Re: Bgwriter strategies
Date
Msg-id 2e78013d0707110451v358cf338uaef9896c4acfd7d3@mail.gmail.com
Whole thread Raw
In response to Re: Bgwriter strategies  (Heikki Linnakangas <heikki@enterprisedb.com>)
Responses Re: Bgwriter strategies  (Alvaro Herrera <alvherre@commandprompt.com>)
Re: Bgwriter strategies  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers

On 7/11/07, Heikki Linnakangas <heikki@enterprisedb.com> wrote:
I was able
to reproduce the phenomenon with a simple C program that writes 8k
blocks in random order to a fixed size file. I've attached it along with
output of running it on my test server. The output shows how the writes
start to periodically block after a while. I was able to reproduce the
problem on my laptop as well. Can anyone explain what's going on?



I think you are assuming that the next write of the same block won't
use another OS cache block. I doubt if thats the way writes are handled
by the kernel. Each write would typically end up being queued up in the kernel
where each write will have its own copy of the block to the written. Isn't it ?


Thanks,
Pavan

--
Pavan Deolasee
EnterpriseDB     http://www.enterprisedb.com

pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: Bgwriter strategies
Next
From: Alvaro Herrera
Date:
Subject: Re: Bgwriter strategies