Re: initdb and fsync - Mailing list pgsql-hackers

From Tom Lane
Subject Re: initdb and fsync
Date
Msg-id 28922.1342222994@sss.pgh.pa.us
Whole thread Raw
In response to Re: initdb and fsync  (Jeff Davis <pgsql@j-davis.com>)
List pgsql-hackers
Jeff Davis <pgsql@j-davis.com> writes:
> One point about the commit message: fadvise does not block to go into
> the request queue, sync_file_range does. The problem with fadvise is
> that, when the request queue is small, it fills up so fast that most of
> the requests never make it in, and fadvise is essentially a no-op.
> sync_file_range waits for room in the queue, which is (based on my
> tests) enough to improve the scheduling a lot.

I see.  I misunderstood your previous message.  In that case, it seems
quite likely that it might be helpful if copy_file were to aggregate
the fadvise/sync_file_range calls over larger pieces of the file.
(I'm assuming that the request queue isn't bright enough to aggregate
by itself, though that might be wrong.)
        regards, tom lane


pgsql-hackers by date:

Previous
From: Jose Ildefonso Camargo Tolosa
Date:
Subject: Re: Synchronous Standalone Master Redoux
Next
From: Jose Ildefonso Camargo Tolosa
Date:
Subject: Re: Synchronous Standalone Master Redoux