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-02-22 10:06:44
Message-ID: alpine.DEB.2.10.1602221056080.18607@sto
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


Hallo Andres,

>> AFAICR I used a "flush context" for each table space in some version
>> I submitted, because I do think that this whole writeback logic really
>> does make sense *per table space*, which suggest that there should be as
>> many write backs contexts as table spaces, otherwise the positive effect
>> may going to be totally lost of tables spaces are used. Any thoughts?
>
> Leads to less regular IO, because if your tablespaces are evenly sized
> (somewhat common) you'll sometimes end up issuing sync_file_range's
> shortly after each other. For latency outside checkpoints it's
> important to control the total amount of dirty buffers, and that's
> obviously independent of tablespaces.

I did a quick & small test with random updates on 16 tables with
checkpoint_flush_after=16 checkpoint_timeout=30

(1) with 16 tablespaces (1 per table, but same disk) :
tps = 1100, 27% time under 100 tps

(2) with 1 tablespace :
tps = 1200, 3% time under 100 tps

This result is logical: with one writeback context shared between
tablespaces the sync_file_range is issued on a few buffers per file at a
time on the 16 files, no coalescing occurs there, so this result in random
IOs, while with one table space all writes are aggregated per file.

ISTM that this quick test shows that a writeback context are relevant per
tablespace, as I expected.

--
Fabien.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Christoph Berg 2016-02-22 10:10:52 Re: Relaxing SSL key permission checks
Previous Message Michael Paquier 2016-02-22 08:46:51 Re: WIP: SCRAM authentication