Re: RE: [COMMITTERS] pgsql/src/backend/access/transam ( xact.c xlog.c)

From: Alfred Perlstein <bright(at)wintelcom(dot)net>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: Don Baccus <dhogaza(at)pacifier(dot)com>, Vadim Mikheev <vmikheev(at)sectorbase(dot)com>, "'Tom Lane'" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Tatsuo Ishii <t-ishii(at)sra(dot)co(dot)jp>, peter_e(at)gmx(dot)net, pgsql-hackers(at)postgresql(dot)org
Subject: Re: RE: [COMMITTERS] pgsql/src/backend/access/transam ( xact.c xlog.c)
Date: 2000-11-16 20:05:41
Message-ID: 20001116120540.K830@fw.wintelcom.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

* Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> [001116 11:59] wrote:
> > At 02:13 PM 11/16/00 -0500, Bruce Momjian wrote:
> >
> > >> I think the default should probably be no delay, and the documentation
> > >> on enabling this needs to be clear and obvious (i.e. hard to miss).
> > >
> > >I just talked to Tom Lane about this. I think a sleep(0) just before
> > >the flush would be the best. It would reliquish the cpu slice if
> > >another process is ready to run. If no other backend is running, it
> > >probably just returns. If there is another one, it gives it a chance to
> > >complete. On return from sleep(0), it can check if it still needs to
> > >flush. This would tend to bunch up flushers so they flush only once,
> > >while not delaying cases where only one backend is running.
> >
> > This sounds like an interesting approach, yes.
>
> In OS kernel design, you try to avoid process herding bottlenecks.
> Here, we want them herded, and giving up the CPU may be the best way to
> do it.

Yes, but if everyone yeilds you're back where you started, and with
128 or more backends do you really want to cause possibly that many
context switches per fsync?

--
-Alfred Perlstein - [bright(at)wintelcom(dot)net|alfred(at)freebsd(dot)org]
"I have the heart of a child; I keep it in a jar on my desk."

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2000-11-16 20:11:50 Re: RE: [COMMITTERS] pgsql/src/backend/access/transam ( xact.c xlog.c)
Previous Message Larry Rosenman 2000-11-16 20:04:03 Re: RE: [COMMITTERS] pgsql/src/backend/access/transam ( xact.c xlog.c)