Re: Re[4]: Allowing WAL fsync to be done via O_SYNC

From: Alfred Perlstein <bright(at)wintelcom(dot)net>
To: Xu Yifeng <jamexu(at)telekbird(dot)com(dot)cn>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "Mikheev, Vadim" <vmikheev(at)SECTORBASE(dot)COM>, Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Re[4]: Allowing WAL fsync to be done via O_SYNC
Date: 2001-03-16 12:45:35
Message-ID: 20010316044534.T29888@fw.wintelcom.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

* Xu Yifeng <jamexu(at)telekbird(dot)com(dot)cn> [010316 01:15] wrote:
> Hello Alfred,
>
> Friday, March 16, 2001, 3:21:09 PM, you wrote:
>
> AP> * Xu Yifeng <jamexu(at)telekbird(dot)com(dot)cn> [010315 22:25] wrote:
> >>
> >> Could anyone consider fork a syncer process to sync data to disk ?
> >> build a shared sync queue, when a daemon process want to do sync after
> >> write() is called, just put a sync request to the queue. this can release
> >> process from blocked on writing as soon as possible. multipile sync
> >> request for one file can be merged when the request is been inserting to
> >> the queue.
>
> AP> I suggested this about a year ago. :)
>
> AP> The problem is that you need that process to potentially open and close
> AP> many files over and over.
>
> AP> I still think it's somewhat of a good idea.
>
> I am not a DBMS guru.

Hah, same here. :)

> couldn't the syncer process cache opened files? is there any problem I
> didn't consider ?

1) IPC latency, the amount of time it takes to call fsync will
increase by at least two context switches.

2) a working set (number of files needed to be fsync'd) that
is larger than the amount of files you wish to keep open.

--
-Alfred Perlstein - [bright(at)wintelcom(dot)net|alfred(at)freebsd(dot)org]

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Zeugswetter Andreas SB 2001-03-16 15:02:38 AW: Allowing WAL fsync to be done via O_SYNC
Previous Message Xu Yifeng 2001-03-16 08:53:12 Re[4]: Allowing WAL fsync to be done via O_SYNC