Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1a79ue-0004AH-K4 for pgsql-performance@arkaria.postgresql.org; Thu, 10 Dec 2015 22:42:12 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1a79ue-0006E7-6h for pgsql-performance@arkaria.postgresql.org; Thu, 10 Dec 2015 22:42:12 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1a79sy-0003qD-Rh for pgsql-performance@postgresql.org; Thu, 10 Dec 2015 22:40:28 +0000 Received: from mail-wm0-x233.google.com ([2a00:1450:400c:c09::233]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84) (envelope-from ) id 1a79sv-00044t-91 for pgsql-performance@postgresql.org; Thu, 10 Dec 2015 22:40:28 +0000 Received: by mail-wm0-x233.google.com with SMTP id n186so5882419wmn.1 for ; Thu, 10 Dec 2015 14:40:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-type:content-transfer-encoding; bh=XMPMMkwMjISjv8K0WHBVFwMxuVlv4D67Rq3BvLFxULE=; b=VOCB2NxRZTnQjHAGySc5U/bky2Ag7qgswUyuPbl97Sr78IIHMsl4uJuk7qdVqqf0Z+ BCOP0U0BHQ3TPHsB2qEeJhxmguWtHGqUoeeop/FaGjTceH2B7iljejR6qE3Rc8f/Z9W1 0ZUL51OEIDVQcvxdOYkhadxQ1ie4Q/1kKgD/0mbMsu9ejNpF8r2VtDeydB7lv1BFIrYS /7H/cldem9CO5xF0v5sxlzaO9zFTWvckY7txYxF5pG/Jc2OwLdTS7fqyn3ZCazP4lCoj /mYXeiOQc5/5o2L5sm1Usv9FZF9imIAH2v2wYq4pxFpK9GzkDi4pxMk5PmUFWhjJzNJQ MAxA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-type :content-transfer-encoding; bh=XMPMMkwMjISjv8K0WHBVFwMxuVlv4D67Rq3BvLFxULE=; b=AkyCaAwCpFzVDcZIX8SXMDIaKWhec0GK3ZlzSNdQ51C4qENhQ9v14BkVI+vaXq1yv/ BEWZ045tpeakMkFeRy3fN4ZPKO19vc+if4Xby6G6yYRi+EzUqhiGz/IYlPcAwcQUXdQ7 qniaVIEI8MYCha8Bmcj9tnY7Yx7ThH9q1nn9plv2CviqPyLV/Zm8JRYhvFsX29Jz9ZyM JRAWfgA4+6KLDEk1Fn5XuDLUACmxbZzoHPEobWOXhVloDh01u9FK9+3ZptioE4CxDeU+ vH8VbTwI26Lr4A+BYc4VtHa0DrQrCviugo2UR2MPSrFCwEA52O9BTZQdsTrtG1FsUkPC LbQg== X-Gm-Message-State: ALoCoQlp73N9dnk4OtKhL71cSvioZd6K6F1lOr0Boxns0RmKIbAEuGgRRsVpWsNiK7/yW1V6Byp+wRkgt4zJN1iZvW6Pa2+f4mfG9DwZlFugCgmlWyVraag6w0Za9+mPAOB9Mn8Rle1tIk2dLtmSRPu2a7Lz69dA5PKyUcXhxOIFDj+upmENktrDdNTYhiqR/2PWf3gK52WoP7OJSu38/vBCxmLvhZe6mA== X-Received: by 10.194.9.169 with SMTP id a9mr15336923wjb.60.1449787222721; Thu, 10 Dec 2015 14:40:22 -0800 (PST) Received: from [10.137.1.13] (ip-78-45-216-26.net.upcbroadband.cz. [78.45.216.26]) by smtp.gmail.com with ESMTPSA id c4sm14364722wjs.36.2015.12.10.14.40.21 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 10 Dec 2015 14:40:21 -0800 (PST) Subject: Re: checkpoints, proper config To: pgsql-performance@postgresql.org References: <5669B47B.9010504@commandprompt.com> From: Tomas Vondra Message-ID: <5669FF52.2030303@2ndquadrant.com> Date: Thu, 10 Dec 2015 23:40:18 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 MIME-Version: 1.0 In-Reply-To: <5669B47B.9010504@commandprompt.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-performance Precedence: bulk Sender: pgsql-performance-owner@postgresql.org On 12/10/2015 06:20 PM, Joshua D. Drake wrote: > On 12/10/2015 01:12 AM, Tory M Blue wrote: > >> checkpoint_timeout = 5min >> >> checkpoint_completion_target = 0.9 >> > > The above is your problem. Make checkpoint_timeout = 1h . Also, > considering turning synchronous_commit off. I doubt that. The report mentioned that the checkpoints happen 0.027... minutes apart (assuming the minutes_between_checkpoints is computed in a sane way). That's way below 5 minutes, so the checkpoints have to be triggered by something else - probably by running out of segments, but we don't know the value before Tory increased it to 150. Also, recommending synchronous_commit=off is a bit silly, because not only it introduces data loss issues, but it'll likely cause even more frequent checkpoints. Tory, please enable logging of checkpoints (log_checkpoints=on). Also, I don't think it makes much sense to set (checkpoint_warning > checkpoint_timeout) as it kinda defeats the whole purpose of the warning. regards -- Tomas Vondra http://www.2ndQuadrant.com PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance