Re: Let PostgreSQL's On Schedule checkpoint write buffer smooth spread cycle by tuning IsCheckpointOnSchedule?

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>
Cc: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Simon Riggs <simon(at)2ndquadrant(dot)com>, Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, digoal zhou <digoal(dot)zhou(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Let PostgreSQL's On Schedule checkpoint write buffer smooth spread cycle by tuning IsCheckpointOnSchedule?
Date: 2015-07-04 22:14:21
Message-ID: D5A45941-6B93-49F7-848E-5DD17A8F5002@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Jul 4, 2015, at 11:34 AM, Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr> wrote:
>>>>> In summary, the X^1.5 correction seems to work pretty well. It doesn't
>>>>> completely eliminate the problem, but it makes it a lot better.
>
> I've looked at the maths.
>
> I think that the load is distributed as the derivative of this function, that is (1.5 * x ** 0.5): It starts at 0 but very quicky reaches 0.5, it pass the 1.0 (average load) around 40% progress, and ends up at 1.5, that is the finishing load is 1.5 the average load, just before fsyncing files. This looks like a recipee for a bad time: I would say this is too large an overload. I would suggest a much lower value, say around 1.1...
>
> The other issue with this function is that it should only degrade performance by disrupting the write distribution if someone has WAL on a different disk. As I understand it this thing does only make sense if the WAL & the data are on the samee disk. This really suggest a guc.

I am a bit skeptical about this. We need test scenarios that clearly show the benefit of having and of not having this behavior. It might be that doing this always is fine for everyone.

...Robert

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Noah Misch 2015-07-04 22:40:41 xlc atomics
Previous Message Tomas Vondra 2015-07-04 19:07:02 Re: multivariate statistics / patch v7