From: | Simon Riggs <simon(at)2ndQuadrant(dot)com> |
---|---|
To: | Phoenix Kiula <phoenix(dot)kiula(at)gmail(dot)com> |
Cc: | PG-General Mailing List <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Vacuums taking forever :( |
Date: | 2009-02-03 15:37:43 |
Message-ID: | 1233675463.4500.177.camel@ebony.2ndQuadrant |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Tue, 2009-02-03 at 20:46 +0800, Phoenix Kiula wrote:
> This is PG 8.2.9
VACUUM spoils the cache in 8.2
What happens is that VACUUM reads through the whole table, knocking
other blocks out of cache. These then need to be read in again by other
processes, so there is some I/O thrashing. If your bgwriter settings are
ineffective then normal users will also need to write the dirty blocks
left by VACUUM and probably flush WAL as well while doing it, using even
more I/O.
We fixed this in 8.3 so that VACUUM uses at most 256KB of memory as it
goes, which makes it both faster because of CPU L2 cache effects and
hardly spoils shared_buffer cache at all. Bgwriter is also better tuned
so it will handle dirty blocks better.
--
Simon Riggs www.2ndQuadrant.com
PostgreSQL Training, Services and Support
From | Date | Subject | |
---|---|---|---|
Next Message | James Dooley | 2009-02-03 15:46:55 | Re: Text search, ERROR: invalid byte sequence for encoding "UTF8": 0xe9640a |
Previous Message | Tom Lane | 2009-02-03 15:37:07 | Re: Text search, ERROR: invalid byte sequence for encoding "UTF8": 0xe9640a |