From: | Martijn van Oosterhout <kleptog(at)svana(dot)org> |
---|---|
To: | "Jim C(dot) Nasby" <jnasby(at)pervasive(dot)com> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Greg Stark <gsstark(at)mit(dot)edu>, Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, Kris Kennaway <kris(at)obsecurity(dot)org>, "Marc G(dot) Fournier" <scrappy(at)hub(dot)org>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: postgresql and process titles |
Date: | 2006-06-14 20:37:59 |
Message-ID: | 20060614203759.GJ4748@svana.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Wed, Jun 14, 2006 at 03:21:55PM -0500, Jim C. Nasby wrote:
> One idea would be to keep something akin to a FIFO, where the backend
> would write records instead of updating/over-writing them, and the
> reader process would only read records where there was no risk that they
> were still being written. That would mean that the reader would need to
> stay at least one record behind the backend, but that's probably
> manageable.
The problem with a FIFO is that the pointers controlling where the
start/end are become the contention.
The only thing I can think of is to have the backends only write atomic
types and give each backend their own cache-line. The profiler would
simply wake up every N ms and read each value, accumulating them
somewhere.
No locking and there would be a maximum of one cache-line bounce per
backend per N ms. I'm not sure you can get better than that under the
situation.
Have a nice day,
--
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.
From | Date | Subject | |
---|---|---|---|
Next Message | Jim C. Nasby | 2006-06-14 20:49:17 | Re: Alternative variable length structure |
Previous Message | Jim C. Nasby | 2006-06-14 20:21:55 | Re: postgresql and process titles |