Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1f6A8q-0005LR-UW for pgsql-general@arkaria.postgresql.org; Wed, 11 Apr 2018 07:26:05 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1f6A8p-0005i7-BM for pgsql-general@arkaria.postgresql.org; Wed, 11 Apr 2018 07:26:03 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1f6A8p-0005hy-0L for pgsql-general@lists.postgresql.org; Wed, 11 Apr 2018 07:26:03 +0000 Received: from mx2.mailbox.org ([80.241.60.215]) by makus.postgresql.org with esmtps (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1f6A8l-0008KT-Pc for pgsql-general@lists.postgresql.org; Wed, 11 Apr 2018 07:26:01 +0000 Received: from smtp1.mailbox.org (smtp1.mailbox.org [80.241.60.240]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx2.mailbox.org (Postfix) with ESMTPS id E46A440FCD; Wed, 11 Apr 2018 09:25:55 +0200 (CEST) X-Virus-Scanned: amavisd-new at heinlein-support.de Received: from smtp1.mailbox.org ([80.241.60.240]) by spamfilter01.heinlein-hosting.de (spamfilter01.heinlein-hosting.de [80.241.56.115]) (amavisd-new, port 10030) with ESMTP id PbPJTurxWwMB; Wed, 11 Apr 2018 09:25:54 +0200 (CEST) Message-ID: <1523431552.2428.16.camel@cybertec.at> Subject: Re: Suggest the best values for the postgres configuration parameters From: Laurenz Albe To: Raghavendra Rao J S V , pgsql-general@lists.postgresql.org Date: Wed, 11 Apr 2018 09:25:52 +0200 In-Reply-To: References: Organization: Cybertec Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Raghavendra Rao J S V wrote: > We are using postgres 9.2 version on Centos operating system. That's no good, 9.2 is out of support. Use v10 or at least 9.6. > Total ram available is 80GB . At present we don't have any connection pool mechanisiam. Max number of connections are allowed is 1000. That's not good either. Use a connection pool. > Could you please suggest the best values for the below configuration parameters? > > shared_buffers 4 or 8 GB > effective_cache_size 80 GB minus what the OS and other applications need. > work_mem Depends on your queries. With max_connections absurdly high as 1000, no more than 50MB. > maintenance_work_mem 1GB > checkpoint_segments Depends on your workload. > wal_keep_segments 0 (unless you need replication and have nothing better) > checkpoint_completion_target 0.8 > Max_prepared_transactions =0 0 (unless you need distributed transactions) Yours, Laurenz Albe -- Cybertec | https://www.cybertec-postgresql.com