Re: Vacuums taking forever :( - Mailing list pgsql-general

From Simon Riggs
Subject Re: Vacuums taking forever :(
Date
Msg-id 1233675463.4500.177.camel@ebony.2ndQuadrant
Whole thread Raw
In response to Vacuums taking forever :(  (Phoenix Kiula <phoenix.kiula@gmail.com>)
List 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


pgsql-general by date:

Previous
From: Filip Rembiałkowski
Date:
Subject: Re: Fastest way to drop an index?
Next
From: Craig Ringer
Date:
Subject: Re: embedded pgsql media-failure