Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 9B2661337B97 for ; Sun, 2 Jan 2011 22:03:47 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 14261-01 for ; Mon, 3 Jan 2011 02:03:41 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail.cobrasonic.com (250.57.145.202.adsl.static.ttn.net [202.145.57.250]) by mail.postgresql.org (Postfix) with ESMTP id 45A011337B53 for ; Sun, 2 Jan 2011 22:03:38 -0400 (AST) Received: from marcU45J (pc123239 [192.168.123.239]) (authenticated bits=0) by mail.cobrasonic.com (8.14.1/8.14.1) with ESMTP id p0321dMr023174; Mon, 3 Jan 2011 10:01:39 +0800 From: "marc.hsiao" To: "'Scott Marlowe'" Cc: References: <-121201471744211051@unknownmsgid> In-Reply-To: Subject: Re: How to turn autovacuum prevent wrap around run faster? Date: Mon, 3 Jan 2011 10:01:38 +0800 Message-ID: <000601cbaaea$28a5e120$79f1a360$@hsiao@cobrasonic.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: AcumViSAZn9an7XiRMqWn2mo38ueAAEkzBww Content-Language: zh-tw X-cobrasonic-MailScanner-Information: Please contact the ISP for more information X-cobrasonic-MailScanner-ID: p0321dMr023174 X-cobrasonic-MailScanner: Not scanned: please contact your Internet E-Mail Service Provider for details X-cobrasonic-MailScanner-From: marc.hsiao@cobrasonic.com X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.899 tagged_above=-10 required=5 tests=BAYES_00=-1.9, MSGID_MULTIPLE_AT=0.001 X-Spam-Level: X-Archive-Number: 201101/3 X-Sequence-Number: 41790 Hi Scot Marlowe: > Set an autovacuum max cost much higher than the vacuum max cost > (100000 or so) and drop autovac cost delay to 0, then restart > autovacuum. I had set " autovacuum_vacuum_cost_delay=3D0". BTW, how to set " autovacuum max cost" ? Regards Marc -----Original Message----- From: pgsql-performance-owner@postgresql.org [mailto:pgsql-performance-owner@postgresql.org] On Behalf Of Scott = Marlowe Sent: Tuesday, December 28, 2010 2:12 PM To: marc.hsiao Cc: pgsql-performance@postgresql.org Subject: Re: [PERFORM] How to turn autovacuum prevent wrap around run faster? On Mon, Dec 27, 2010 at 10:53 PM, marc.hsiao wrote: > Hi ALL: > > My Database is for logs only, I almost have 30G data growth in my database. > > I Use partition table to store those data, those tables are = partitioned by > time column daily. > > My data only keep for three days. > > I will dump those data into dump file and drop the partition table = after > three days. > > My question is : > > The partition table that I have to backup and drop is running a long > Prevent-Wraparound-Autovaccuum, > > Is any way to let the vacuum faster? > > The Prevent-Wraparound-Autovaccuum run very slow, almost 36 hours. > My Disk IO is low. > My Server config for vacuum list below: > maintenance_work_mem =3D 192MB=A0=A0=A0 # min 1MB > > max_stack_depth =3D 4MB=A0=A0=A0=A0 # min 100kB > > > > vacuum_cost_delay =3D 50ms=A0=A0=A0 # 0-100 milliseconds That's a pretty high regular vacuum cost delay. Just sayin, autovac doesn't use it. > vacuum_cost_page_hit =3D 6=A0=A0=A0 # 0-10000 credits > > vacuum_cost_limit =3D 1000=A0=A0=A0 # 1-10000 credits And that's pretty low. > # AUTOVACUUM PARAMETERS > > #------------------------------------------------------------------------= --- --- > autovacuum =3D on=A0=A0=A0=A0 # Enable autovacuum subprocess?=A0 'on' > autovacuum_max_workers =3D 3=A0=A0=A0 # max number of autovacuum = subprocesses > autovacuum_naptime =3D 1=A0=A0=A0 # time between autovacuum runs > autovacuum_vacuum_scale_factor =3D 0.01 # fraction of table size = before vacuum > autovacuum_vacuum_cost_delay =3D 10ms # default vacuum cost delay for Set an autovacuum max cost much higher than the vacuum max cost (100000 or so) and drop autovac cost delay to 0, then restart autovacuum. --=20 Sent via pgsql-performance mailing list = (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance