Re: dirty_ratio & dirty_background_ratio settings with huge memory

From: Andres Freund <andres(at)anarazel(dot)de>
To: pinker <pinker(at)onet(dot)eu>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: dirty_ratio & dirty_background_ratio settings with huge memory
Date: 2018-03-07 03:29:52
Message-ID: 20180307032952.vtj7tuywtgieeo2r@alap3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 2018-03-06 18:59:01 -0700, pinker wrote:
> 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?

In most cases where the same buffer is updated frequently it should be
stored in postgres' buffer cache. Note you can tune those.

Greetings,

Andres Freund

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Arup Rakshit 2018-03-07 04:40:36 help to query json column
Previous Message Scott Frazer 2018-03-07 03:24:18 Help troubleshooting SubtransControlLock problems