Re: degenerate performance on one server of 3

From: Scott Carey <scott(at)richrelevance(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>, Erik Aronesty <erik(at)q32(dot)com>
Cc: "reid(dot)thompson(at)ateb(dot)com" <reid(dot)thompson(at)ateb(dot)com>, "pgsql-performance(at)postgresql(dot)org" <pgsql-performance(at)postgresql(dot)org>
Subject: Re: degenerate performance on one server of 3
Date: 2009-06-04 18:10:35
Message-ID: C64D5C2B.74AF%scott@richrelevance.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On 6/4/09 6:16 AM, "Robert Haas" <robertmhaas(at)gmail(dot)com> wrote:

> On Thu, Jun 4, 2009 at 7:31 AM, Erik Aronesty <erik(at)q32(dot)com> wrote:
>> Seems like "VACUUM FULL" could figure out to do that too depending on
>> the bloat-to-table-size ratio ...
>>
>>   - copy all rows to new table
>>   - lock for a millisecond while renaming tables
>>   - drop old table.
>
> You'd have to lock the table at least against write operations during
> the copy; otherwise concurrent changes might be lost.
>
> AIUI, this is pretty much what CLUSTER does, and I've heard that it
> works as well or better as VACUUM FULL for bloat reclamation.
> However, it's apparently still pessimal:
> http://archives.postgresql.org/pgsql-hackers/2008-08/msg01371.php (I
> had never heard this word before Greg Stark used it in this email, but
> it's a great turn of phrase, so I'm reusing it.)
>

Interesting, I suppose a race between VACUUM FULL and CLUSTER will depend a
lot on the index and how much of the table already exists in RAM.

If the index is in RAM, and most of the table is, CLUSTER will be rather
fast.

>> Locking a whole table for a very long time is scary for admins.
>
> Agreed. It would be nice if we had some kind of "incremental full"
> vacuum that would run for long enough to reclaim a certain number of
> pages and then exit. Then you could clean up this kind of problem
> incrementally instead of in one shot. It would be even nicer if the
> lock strength could be reduced, but I'm guessing that's not easy to do
> or someone would have already done it by now. I haven't read the code
> myself.
>
> ...Robert
>
> --
> Sent via pgsql-performance mailing list (pgsql-performance(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-performance
>

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Robert Haas 2009-06-04 18:29:05 Re: Scalability in postgres
Previous Message Scott Carey 2009-06-04 18:04:30 Re: Scalability in postgres