Re: new vacuum is slower for small tables - Mailing list pgsql-hackers

From Tom Lane
Subject Re: new vacuum is slower for small tables
Date
Msg-id 26314.1228751836@sss.pgh.pa.us
Whole thread Raw
In response to Re: new vacuum is slower for small tables  ("Pavel Stehule" <pavel.stehule@gmail.com>)
Responses Re: new vacuum is slower for small tables  ("Pavel Stehule" <pavel.stehule@gmail.com>)
List pgsql-hackers
"Pavel Stehule" <pavel.stehule@gmail.com> writes:
> 2008/12/8 Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>:
>> How did you measure that?

> it's simple test

> create table x(a integer,  b integer);
> insert into x select i, i from generate_series(1,1000) g(i);

> and then vacuum on 8.3.5 and vacuum on current CVS HEAD.

Hmm.  There is something else going on here besides the pg_proc scan.
Even after patching that, the elapsed time for a small-table VACUUM is
typically much longer than in 8.3.  But what's really interesting is
that if you repeat it multiple times in quick succession, HEAD's time
jumps all over the place whereas 8.3 is relatively stable:

regression=# vacuum x;
VACUUM
Time: 61.809 ms
regression=# vacuum x;
VACUUM
Time: 10.743 ms
regression=# vacuum x;
VACUUM
Time: 40.615 ms
regression=# vacuum x;
VACUUM
Time: 10.015 ms
regression=# vacuum x;
VACUUM
Time: 53.364 ms
regression=# vacuum x;
VACUUM
Time: 9.324 ms
regression=# vacuum x;
VACUUM
Time: 43.339 ms
regression=# vacuum x;
VACUUM
Time: 9.336 ms
regression=# vacuum x;
VACUUM
Time: 53.271 ms

8.3's time is consistently between 9 and 12 msec on same box and
same data.  Anyone have an idea what's causing this?
        regards, tom lane


pgsql-hackers by date:

Previous
From: "Pavel Stehule"
Date:
Subject: Re: new vacuum is slower for small tables
Next
From: Tom Lane
Date:
Subject: Re: Updates of SE-PostgreSQL 8.4devel patches (r1268)