Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1XBlmz-00012H-Ol for pgsql-general@arkaria.postgresql.org; Mon, 28 Jul 2014 14:20:34 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1XBlmz-0008Tm-8r for pgsql-general@arkaria.postgresql.org; Mon, 28 Jul 2014 14:20:33 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1XBlmx-0008TV-Ts for pgsql-general@postgresql.org; Mon, 28 Jul 2014 14:20:32 +0000 Received: from nm17-vm3.bullet.mail.ne1.yahoo.com ([98.138.91.147]) by makus.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1XBlmu-0001VI-Ek for pgsql-general@postgresql.org; Mon, 28 Jul 2014 14:20:30 +0000 Received: from [98.138.226.179] by nm17.bullet.mail.ne1.yahoo.com with NNFMP; 28 Jul 2014 14:20:27 -0000 Received: from [98.138.87.6] by tm14.bullet.mail.ne1.yahoo.com with NNFMP; 28 Jul 2014 14:20:26 -0000 Received: from [127.0.0.1] by omp1006.mail.ne1.yahoo.com with NNFMP; 28 Jul 2014 14:20:26 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 974172.53352.bm@omp1006.mail.ne1.yahoo.com Received: (qmail 45093 invoked by uid 60001); 28 Jul 2014 14:20:26 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ymail.com; s=s1024; t=1406557226; bh=2gaWdFj9WmXvZuSjMs7rEdxdlpauxEfcsnWdWTn+Bvk=; h=References:Message-ID:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=BCXC4Ms7+6VcuE9He1707MZe1G5fvZwBp8W9/IEixgf6sxji+bDXehgnkVcaVGUgGzBltob3Yz2vWwxEvJ0awARW8F9HLwbuisA6JP2QlxiHZwLUAi28SgGNow/ZyiB1FrzJwzFhHlFss1EMJPQa9Hdd3oGOCh2NfwyQmc3Ev4k= X-YMail-OSG: hcWQG4UVM1lZEnvyJUod10ZRm0_EJSHCqa_85qeQa_pBmUk gKbZPou77Eg7WiW1nB_f8tWyvVRs0bUlu3gJHtxHmHQTbP21abZ1wgKxQk5E zE6xBljZqBh0qtig1L0VUIRldaNt3P5JYFbHVZVC5TIaG997RAttby8bht4l pah9otXYUIacopgj.t.CHAzoJUBtvklgW2gKIfvs.kPEF9PPyhZwLfqfBc4I 32V15_GijJ2nQ6nHBeZgC3v5OBrVmpL.qlEzTMnYUFBQ1UkNDNg8G_rVyuNS qj7z9QtCyl9V0ZQVYjtaPGNfhm.0hs_Yzwcod9kPZJS0kQugUb094c_k_030 IjIgyhW25AJdyK1aB6PG67o8dNaR6OKBwT4DZWvUnnFLqiyELny84P1JCNhl cScYDyPyFb8M3DfKwlA4N.0tsFm26x1_Sg16pt3Bv.7kze5PTdQbIzWVCksW IPIf04kUFG912mKCghgNsAbmdjI.joUGpF8EkEs_IyJMR060D16fdEmAw4Tn IGChMo2j.3Gy74TyyVIgHiCBpN7GS5EFyrRB8iFKLGfOLyhJDHavsoCnRkND hky83VIV5 Received: from [24.178.25.147] by web122301.mail.ne1.yahoo.com via HTTP; Mon, 28 Jul 2014 07:20:26 PDT X-Rocket-MIMEInfo: 002.001, UHJhYmhqb3QgU2hlZW5hIDxwcmFiaGpvdC5zaGVlbmFAcml2YWx3YXRjaC5jb20.IHdyb3RlOgoKPiBQb3N0Z3JlU1FMIDguMy43IG9uIHg4Nl82NC11bmtub3duLWxpbnV4LWdudSwgY29tcGlsZWQgYnkgR0NDIGdjYyAoR0NDKSAzLjQuNiAyMDA2MDQwNCAoUmVkIEhhdCAzLjQuNi05KQoKUnVubmluZyBhbnl0aGluZyBvbiB0aGF0IHZlcnNpb24gaXMgaW5zYW5lLsKgIE5vdCBvbmx5IGhhcyB0aGUgOC4zCm1ham9yIHJlbGVhc2UgYmVlbiBvdXQgb2Ygc3VwcG9ydCBzaW5jZSBGZWJydWFyeSBvZiAyMDEzLCABMAEBAQE- X-Mailer: YahooMailWebService/0.8.196.685 References: <1405975881.98993.YahooMailNeo@web122303.mail.ne1.yahoo.com> <53CD8048.4010002@hogranch.com> Message-ID: <1406557226.17685.YahooMailNeo@web122301.mail.ne1.yahoo.com> Date: Mon, 28 Jul 2014 07:20:26 -0700 From: Kevin Grittner Reply-To: Kevin Grittner Subject: Re: Checkpoint_segments optimal value To: Prabhjot Sheena , John R Pierce Cc: pgsql In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Pg-Spam-Score: -2.0 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-general Precedence: bulk Sender: pgsql-general-owner@postgresql.org Prabhjot Sheena wrote: > PostgreSQL 8.3.7 on x86_64-unknown-linux-gnu, compiled by GCC gcc (GCC) 3= .4.6 20060404 (Red Hat 3.4.6-9) Running anything on that version is insane.=A0 Not only has the 8.3 major release been out of support since February of 2013, but you're missing about 4 years of fixes for serious bugs and security issues since the last patch version of 8.3 before it went out of support.=A0 Any vacuum or planning problems you are seeing on that release are very likely fixed on a supported version. > This is what i did to improve query performance. i recreated all > the indexes on work_unit table and have been running vacuum > analyze through cron job 3 times a day on two tables that are in > the query. The query performance is between 2 to 3 seconds now. That's pretty solid evidence that you have been having problems with bloat.=A0 The most common cause of this is not setting autovacuum to be aggressive enough. > autovacuum_max_workers =3D 1 Vacuum of one big table could starve all other tables, resulting in bloat.=A0 If anything, this should be set larger than the default. You might want to try setting it to somewhere in the 3 to 5 range, but then watch for any long periods where all workers are busy.=A0 If you see that, you probably need more workers.=A0 I would also boost autovacuum_vacuum_cost_limit to maybe 500. > The strange thing i noticed is that just today at one time query > performance came down to under 1 second and started using this > query plan There's really no point hypothesizing about what might cause that in such an old version with so many known bugs.=A0 The best way to improve performance would be to upgrade. -- Kevin Grittner EDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company --=20 Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general