Re: vacuumdb -a -f

From: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
To: D Kavan <bitsandbytes88(at)hotmail(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: vacuumdb -a -f
Date: 2005-08-17 16:15:40
Message-ID: 430362AC.6010807@commandprompt.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

D Kavan wrote:
> Hi,
>
> Thanks for the tips.
>
> Unfortunatley for me, even after started doing vacuumdb -a 3 times a
> day and increasing fsm dramatically , the size of the database won't go
> down even 1 MB. It's stil at 5.6 GB, size after restore = 4 GB. I
> even did a stop/start instead of a re-load to make sure the settings
> took affect. Would a reboot help?

A vacuum full will decrease the size but I am not sure why the size is a
problem. I normal vacuum will not remove rows, it only make them
reusable. So at any given point your database is going to grow after use.

I didn't see this whole thread but is there something specific that
seems to be the issue beyond size?

Sincerely,

Joshua D. Drake

>
> max_fsm_pages = 16000001
> max_fsm_relations = 1000000
>
> shared_buffers = 65536
> work_mem = 32768
> maintenance work mem = 786432
>
> checkpoint_segments = 18
>
>
> ##/etc/sysctl.conf
>
> nel.shmall = 524288
> #kernel.shmall = 2097152
> #kernel.shmmax = 2147483648
> #kernel.shmmax = 1073741824
> kernel.shmmax = 6979321856
> kernel.shmmni = 4096
> kernel.sem = 250 32000 100 128
> fs.file-max = 65536
> net.ipv4.ip_local_port_range = 1024 65000
> vm.overcommit_memory = 2
>
>
> ~DjK
>
>
>
>
>
>> From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
>> To: "D Kavan" <bitsandbytes88(at)hotmail(dot)com>
>> CC: pgsql-admin(at)postgresql(dot)org
>> Subject: Re: [ADMIN] vacuumdb -a -f Date: Mon, 15 Aug 2005 21:31:01 -0400
>>
>> "D Kavan" <bitsandbytes88(at)hotmail(dot)com> writes:
>> > Even though I run vacuumdb -a -f every night with no exceptions or
>> problems,
>> > my database size remains 5.6 GB. After I do a dump/restore, the new
>> > database size is 4.0 GB. How could that be possible?
>>
>> The extra 1.6GB probably represents the amount of junk you generate in
>> one day. So, forget the -f and instead do plain vacuums on a more
>> frequent basis. Make sure your FSM settings are large enough, too.
>>
>> regards, tom lane
>
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: explain analyze is your friend

--
Your PostgreSQL solutions company - Command Prompt, Inc. 1.800.492.2240
PostgreSQL Replication, Consulting, Custom Programming, 24x7 support
Managed Services, Shared and Dedicated Hosting
Co-Authors: plPHP, plPerlNG - http://www.commandprompt.com/

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Zuoxin.Wang 2005-08-17 16:17:28 Re: GRANT ALL PRIVILEGES ON DATABASE
Previous Message Oliver Elphick 2005-08-17 16:08:23 Re: GRANT ALL PRIVILEGES ON DATABASE