Re: Vacuum wait time problem - Mailing list pgsql-admin

From Scott Marlowe
Subject Re: Vacuum wait time problem
Date
Msg-id dcc563d10902131708x2e8dfdadofc6355d8c27c6430@mail.gmail.com
Whole thread Raw
In response to Re: Vacuum wait time problem  (Michael Monnerie <michael.monnerie@is.it-management.at>)
Responses Re: Vacuum wait time problem  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-admin
On Fri, Feb 13, 2009 at 5:02 PM, Michael Monnerie
<michael.monnerie@is.it-management.at> wrote:
> On Freitag 13 Februar 2009 Roger Ging wrote:
>> I'm running vacuum full analyze verbose on a table with 20million
>> rows and 11 indexes.  In top, I'm seeing [pdflush] and postgres:
>> writer process each using diferent cpu cores, with wait time well
>> above 90% on each of them.  The vacuum has been running for several
>> hours
>
> Roger, I've had the same issue some time ago and wondered why it was so
> slow. I did "iostat -kx 5 555" and saw that I/O was also quite low.
>
> vacuum_cost_delay = 0
> That was the trick for me. It was set to 250(ms), where it took 5 hours
> for a vacuum to run. Now it takes 5-15 minutes.

Wow!!!  250 ms is HUGE in the scheme of vacuum cost delay.  even 10ms
is usually plenty to slow down vacuum enough to keep it out of your
way and double to quadruple your vacuum times.

250 is like taking a nap every 5 feet while running a mile.  :)

pgsql-admin by date:

Previous
From: Michael Monnerie
Date:
Subject: Re: Vacuum wait time problem
Next
From: Tom Lane
Date:
Subject: Re: Vacuum wait time problem