Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fsUMF-0003Ig-Qp for pgsql-general@arkaria.postgresql.org; Wed, 22 Aug 2018 14:43:40 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fsUMB-0001Qd-VP for pgsql-general@arkaria.postgresql.org; Wed, 22 Aug 2018 14:43:35 +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.89) (envelope-from ) id 1fsUMB-0001QV-Km for pgsql-general@lists.postgresql.org; Wed, 22 Aug 2018 14:43:35 +0000 Received: from mail-lj1-x22a.google.com ([2a00:1450:4864:20::22a]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1fsUM9-0001w1-1E for pgsql-general@lists.postgresql.org; Wed, 22 Aug 2018 14:43:35 +0000 Received: by mail-lj1-x22a.google.com with SMTP id u83-v6so1617171lje.12 for ; Wed, 22 Aug 2018 07:43:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language; bh=jg+4kMaz9DANQIMET0uf+vL9Q2npt3odGVJYRBVOLe4=; b=ri/ImvwDyLLZuW1j2YWLM7vE6KqeQi3WCXxb4gV0kCaebWkvZQjQxZYp0sggdYTKM9 QAB0h4kNT+3R5QYQUz9wyGvQjOZazgj5J/qxy3ADqn7cOtyvWsB8/yMD3qwqaTijncvD VEf44o7zKxzVus49mrFW8K2XQVTyYULz/d5yDByfzu8iZra2qCwapA6icEhFBbwo1jrR AUqAF8Lo+27Z3tslOII0dyhFH9/S07y3vtIjSg1fQup0PrK9W/AgnDR72eng9Df/MLSd Q+8Rpuvkf0a1hYCTlerlHiohdKRTdnRuJRWS4HAXJVdvbsdBqS6doV0SqBHGe9N6ghNE 9meg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language; bh=jg+4kMaz9DANQIMET0uf+vL9Q2npt3odGVJYRBVOLe4=; b=ZYexbe7gXqP9xvCF+CIWbnh5t5X4DKkjUmVTWh28h2JIT79+HI1E4Tfj7C/kaC3ywb Tm3TZYbJ6+RQr10o88S5bYQiKaDDVKXzqU2ilecxs2+3Y9wB8cIV5j5QDnWIwghAy+mV HY0yrdVxX51rx4OzCp8tQSxkmd/AS2DDRx3vNaHr1yiMrCwcUD/VUtYlBXhuho6wrArB ZZWUNWueDT4vqCJURpaxzHm90G3gXHXtaXn0QmVWzOmgpZQZulVv9LPMH6WwjK5RMZTR T6dEr1rh6gaZGv834Ef6ikZD6+1tvub9cDW8Dsc+Aa2dgtM2Ym8YF0CAdTgl1UyfG2ah by8A== X-Gm-Message-State: AOUpUlHP8PZRKfhXiO0y3HbzhzZQhsK0OlEaxC+ZBMLCmoy1Fq7dV4gz 2zU6bkU+lIolByBYXq9m51k3/ixM1i8= X-Google-Smtp-Source: AA+uWPwo17dtHRLyv2aJh1Sxi8c+krsAc3GfJJ6+/qHRCjdug57tSOpjsX7kvfjuH5Ex4rEC+cTvIw== X-Received: by 2002:a2e:9144:: with SMTP id q4-v6mr16794747ljg.121.1534949011894; Wed, 22 Aug 2018 07:43:31 -0700 (PDT) Received: from MacBook-Pro-Milutin.local ([193.30.236.200]) by smtp.gmail.com with ESMTPSA id f14-v6sm358511lfm.29.2018.08.22.07.43.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 22 Aug 2018 07:43:31 -0700 (PDT) Subject: Re: "checkpointer process" is consuming more memory. How to control it? To: Raghavendra Rao J S V , pgsql-general@lists.postgresql.org References: From: Maksim Milyutin Message-ID: <0c876e93-3842-da88-3a7e-c574711e9522@gmail.com> Date: Wed, 22 Aug 2018 17:43:30 +0300 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/alternative; boundary="------------A97E458E8C5741F324319B88" Content-Language: en-US List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk This is a multi-part message in MIME format. --------------A97E458E8C5741F324319B88 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit 22.08.2018 16:43, Raghavendra Rao J S V wrote: > We have a database cluster as "db1_data". Under this cluster we have > two databases. one is *db1 *and other is *qovr*. I surprised to see as > "checkpointer process" is consuming 8.73GB of memory(RSS value as > 9158892). Why "checkpointer process" is consuming this much amount of > memory and how to limit the usage of the "checkpointer process" memory. RSS value is not reasonable to determine memory leaks because it takes into account shared segments (e.g. from shared buffer cache). As a long-lived process checkpointer process tries to flush and as a consequence to touch each buffer cell therefore its RSS approaches to local allocated memory plus shared_buffers. If you want to know the real local memory consumption you may to use python utility *smem* to see unshared local memory size. -- Regards, Maksim Milyutin --------------A97E458E8C5741F324319B88 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 7bit

22.08.2018 16:43, Raghavendra Rao J S V wrote:

We have a database cluster as "db1_data". Under this cluster we have two databases. one is db1 and other is qovr. I surprised to see as "checkpointer process" is consuming 8.73GB of memory(RSS value as 9158892). Why "checkpointer process" is consuming this much amount of memory and how to limit the usage of the "checkpointer process" memory.

RSS value is not reasonable to determine memory leaks because it takes into account shared segments (e.g. from shared buffer cache). As a long-lived process checkpointer process tries to flush and as a consequence to touch each buffer cell therefore its RSS approaches to local allocated memory plus shared_buffers.

If you want to know the real local memory consumption you may to use python utility *smem* to see unshared local memory size.

-- 
Regards,
Maksim Milyutin
--------------A97E458E8C5741F324319B88--