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 1etOMH-0006hf-Rg for pgsql-general@arkaria.postgresql.org; Wed, 07 Mar 2018 01:59:09 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1etOMF-000100-U4 for pgsql-general@arkaria.postgresql.org; Wed, 07 Mar 2018 01:59:07 +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 1etOMF-0000zq-MB for pgsql-general@lists.postgresql.org; Wed, 07 Mar 2018 01:59:07 +0000 Received: from n3.nabble.com ([162.255.23.22]) by magus.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1etOMC-0000vn-Fl for pgsql-general@postgresql.org; Wed, 07 Mar 2018 01:59:06 +0000 Received: from n3.nabble.com (localhost [127.0.0.1]) by n3.nabble.com (Postfix) with ESMTP id 72EFAB8B6726 for ; Tue, 6 Mar 2018 18:59:01 -0700 (MST) Date: Tue, 6 Mar 2018 18:59:01 -0700 (MST) From: pinker To: pgsql-general@postgresql.org Message-ID: <1520387941433-0.post@n3.nabble.com> In-Reply-To: <20180306165557.7xulgrkfrlyt2kpx@alap3.anarazel.de> References: <1520331809441-0.post@n3.nabble.com> <20180306165557.7xulgrkfrlyt2kpx@alap3.anarazel.de> Subject: Re: dirty_ratio & dirty_background_ratio settings with huge memory MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Andres Freund wrote > With a halfway modern PG I'd suggest to rather tune postgres settings > that control flushing. That leaves files like temp sorting in memory for > longer, while flushing things controlledly for other sources of > writes. See *_flush_after settings. > > Greetings, > > Andres Freund Thank you Andres, I missed those parameters appearing. It's not the case for this customer, because they have an ancient version 9.0, but it's interesting for others :) The maximal value - 2MB - is it not to small? Regarding the fact that for instance the same buffer will be updated 10 times between checkpoints and bgwriter well be flushing it directly to disk 10 times instead to allow the buffer to stay in the cache and do the update faster? -- Sent from: http://www.postgresql-archive.org/PostgreSQL-general-f1843780.html