Re: [HACKERS] unusual performance for vac following 8.2 upgrade

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Kim <kim(at)myemma(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: [HACKERS] unusual performance for vac following 8.2 upgrade
Date: 2007-01-11 23:10:20
Message-ID: 18336.1168557020@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-performance

I wrote:
> What I think we need to do about this is
> (1) fix pgstat_vacuum_tabstats to have non-O(N^2) behavior; I'm thinking
> of using a hash table for the OIDs instead of a linear list. Should be
> a pretty small change; I'll work on it today.

I've applied the attached patch to 8.2 to do the above. Please give it
a try and see how much it helps for you. Some limited testing here
confirms a noticeable improvement in VACUUM startup time at 10000
tables, and of course it should be 100X worse with 100000 tables.

I am still confused why you didn't see the problem in 8.1, though.
This code is just about exactly the same in 8.1. Maybe you changed
your stats collector settings when moving to 8.2?

regards, tom lane

Attachment Content-Type Size
unknown_filename text/plain 5.2 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2007-01-11 23:10:38 Re: [HACKERS] [PATCHES] wal_checksum = on (default) | off
Previous Message Andrew Dunstan 2007-01-11 23:04:56 Re: [HACKERS] Checkpoint request failed on version 8.2.1.

Browse pgsql-performance by date

  From Date Subject
Next Message Kim 2007-01-11 23:12:46 Re: unusual performance for vac following 8.2 upgrade
Previous Message Tom Lane 2007-01-11 22:26:55 Re: unusual performance for vac following 8.2 upgrade