pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andres Freund <andres@anarazel.de>
To: pinker <pinker@onet.eu>
Cc: pgsql-general@postgresql.org
Subject: Re: dirty_ratio & dirty_background_ratio settings with huge memory
Date: Tue, 6 Mar 2018 08:55:57 -0800
Message-ID: <20180306165557.7xulgrkfrlyt2kpx@alap3.anarazel.de> (raw)
In-Reply-To: <1520331809441-0.post@n3.nabble.com>
References: <1520331809441-0.post@n3.nabble.com>

On 2018-03-06 03:23:29 -0700, pinker wrote:
> Hi,
> I've got cutomer with really huge RAM, now it's:
>              total       used       free     shared    buffers     cached
> Mem:       3102111    3052596      49515     208801        992    2961185
> -/+ buffers/cache:      90418    3011693
> Swap:         8191          1       8190
> 
> (free -m)
> 
> and before it was twice more (6TB).
> 
> and trying to figure out how to set dirty_ratio & dirty_background_ratio
> parameters. Even for normal sized server those default sizes are to high,
> but now would be ridiculously huge, respectively 1,24TB and 300GB. 
> I'm thinking about 1 percent for dirty_ratio and not using
> dirty_background_ratio because it's not possible to set it below 1% but to
> set dirty_background_bytes instead to about 1-2GB.
> Maybe someone has got other experience with RAM of this size and those
> settings?

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




view thread (9+ messages)  latest in thread

Message-ID: <20180306165557.7xulgrkfrlyt2kpx@alap3.anarazel.de>
Permalink:  ../20180306165557.7xulgrkfrlyt2kpx@alap3.anarazel.de/
Also on:    postgresql.org/message-id/20180306165557.7xulgrkfrlyt2kpx@alap3.anarazel.de

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: andres@anarazel.de, pinker@onet.eu
  Subject: Re: dirty_ratio & dirty_background_ratio settings with huge memory
  In-Reply-To: <20180306165557.7xulgrkfrlyt2kpx@alap3.anarazel.de>
  References: <1520331809441-0.post@n3.nabble.com> <20180306165557.7xulgrkfrlyt2kpx@alap3.anarazel.de>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox