From: | Alvaro Herrera <alvherre(at)commandprompt(dot)com> |
---|---|
To: | Pavan Deolasee <pavan(dot)deolasee(at)gmail(dot)com> |
Cc: | Heikki Linnakangas <heikki(at)enterprisedb(dot)com>, Bruce Momjian <bruce(at)momjian(dot)us>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Piggybacking vacuum I/O |
Date: | 2007-01-26 16:35:34 |
Message-ID: | 20070126163534.GQ13036@alvh.no-ip.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Pavan Deolasee wrote:
> On 1/26/07, Alvaro Herrera <alvherre(at)commandprompt(dot)com> wrote:
> >
> >Heikki Linnakangas wrote:
> >> I'd like to see still more evidence that it's a problem before we start
> >> changing that piece of code. It has served us well for years.
> >
> >So the TODO could be "investigate whether caching pg_clog and/or
> >pg_subtrans in local memory can be useful for vacuum performance".
> >
> As Heikki suggested, we should also investigate the same for normal
> backends as well.
Maybe. An idea that comes to mind is to never cache the latest page,
since it'll most likely result in extra reads anyway because there'll be
a lot of IN_PROGRESS transactions.
Problem to solve: how much memory to dedicate to this? Could we mmap()
portions of the pg_clog segment, so that the page could be shared across
backends instead of allocating them for each?
> It would also be interesting to investigate whether early setting of
> hint bits can reduce subsequent writes of blocks. A typical case would
> be a large table being updated heavily for a while, followed by SELECT
> queries. The SELECT queries would set hint bits for the previously
> UPDATEd tuples (old and new versions) and thus cause subsequent
> writes of those blocks for what could have been read-only queries.
This has been suggested before, but I don't see how this could work.
How does the UPDATE transaction go back to the pages it wrote to update
the hint bits, _after_ it committed?
Maybe have the bgwriter update hint bits as it evicts pages out of the
cache? It could result in pg_clog read traffic for each page that needs
eviction; not such a hot idea.
I don't see how this is related to the above proposal though.
--
Alvaro Herrera http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2007-01-26 16:36:46 | Re: Proposal: Snapshot cloning |
Previous Message | Chris Browne | 2007-01-26 16:30:27 | Re: Proposal: Snapshot cloning |