Re: checkpointer continuous flushing - V18

From: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: PostgreSQL Developers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: checkpointer continuous flushing - V18
Date: 2016-03-08 08:28:15
Message-ID: alpine.DEB.2.10.1603080921110.17751@sto
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


>>> Now I cannot see how having one context per table space would have a
>>> significant negative performance impact.
>>
>> The 'dirty data' etc. limits are global, not per block device. By having
>> several contexts with unflushed dirty data the total amount of dirty
>> data in the kernel increases.
>
> Possibly, but how much? Do you have experimental data to back up that this
> is really an issue?
>
> We are talking about 32 (context size) * #table spaces * 8KB buffers = 4MB of
> dirty buffers to manage for 16 table spaces, I do not see that as a major
> issue for the kernel.

More thoughts about your theoretical argument:

To complete the argument, the 4MB is just a worst case scenario, in
reality flushing the different context would be randomized over time, so
the frequency of flushing a context would be exactly the same in both
cases (shared or per table space context) if the checkpoints are the same
size, just that with shared table space each flushing potentially targets
all tablespace with a few pages, while with the other version each
flushing targets one table space only.

So my handwaving analysis is that the flow of dirty buffers is the same
with both approaches, but for the shared version buffers are more equaly
distributed on table spaces, hence reducing sequential write
effectiveness, and for the other the dirty buffers are grouped more
clearly per table space, so it should get better sequential write
performance.

--
Fabien.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alex Hunsaker 2016-03-08 09:11:03 Re: empty array case in plperl_ref_from_pg_array not handled correctly
Previous Message Amit Langote 2016-03-08 08:02:24 Re: [PROPOSAL] VACUUM Progress Checker.