Re: postgres table have a large number of relpages and occupied a big memory size

From: Vivekkumar Pandey <vivekkumar(dot)pandey(at)globallogic(dot)com>
To: Tomas Vondra <tv(at)fuzzy(dot)cz>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: postgres table have a large number of relpages and occupied a big memory size
Date: 2011-08-09 10:24:45
Message-ID: CANE+4N81Hs_WtvBwhiDd22_7Z3fZ_CB_pXEJQrvxzMG6aUZGTQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, Aug 9, 2011 at 2:59 PM, Tomas Vondra <tv(at)fuzzy(dot)cz> wrote:
> On 9 Srpen 2011, 9:18, Vivekkumar Pandey wrote:
>> I have seen that autovacuum takes long time to process .
>> please give me the reason ......
>
> What do you mean by "takes long time to process"? How do you measure it?
>
> Autovacuum is meant as a background process, and it should run on
> background and not influence the performance significantly. In some cases
> the default settings is not aggressive enough, so the database grows.
>
> In that case you probably need to
> - lower autovacuum_vacuum_threshold
> - lower autovacuum_vacuum_scale_factor
> - lower autovacuum_vacuum_cost_delay
> - increase autovacuum_vacuum_cost_limit
>
> But I'm not sure this is the case. And this does not release the space,
> it's still occupied by the database (just ready to be reused by new data).
>
> If you really want to compact the database, you may run VACUUM FULL. But
> that may be very intensive process, locks tables etc.
>
> Tomas
>
>

I have seen postgres.log file and search for a string "autovacuum" .

I found that

time | DB
--------------------------
5:04 | template0
5:09 | DB1
5:25 | DB2
5:30 | template1
5:35 | template0
5:40 | DB1
5:54 | DB2
5:59 | template1

this time is given when autovacuum process available for Database.
Here we see that DB1 consume around 15 min of autovacuum process
while others consume 5 min(equal to naptime).
this shows autovacuum process takes too much time for DB1.

Also, size of DB1 is 15 GB .

Is there any relation of b/w big size of DB and long autovacuum process time????

--
Thanks

VIVEK KUMAR PANDEY

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Adarsh Sharma 2011-08-09 12:05:01 Re: Pgadmin goes missing in Ubuntu
Previous Message hubert depesz lubaczewski 2011-08-09 09:57:28 Re: Problem with planner