Re: 答复:[HACKERS] 答复:[HACKERS] about fsync in CLOG buffer write

From: Andres Freund <andres(at)anarazel(dot)de>
To: 周正中(德歌) <dege(dot)zzz(at)alibaba-inc(dot)com>
Cc: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, 张广舟(明虚) <guangzhou(dot)zgz(at)alibaba-inc(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, 范孝剑(康贤) <funnyxj(dot)fxj(at)alibaba-inc(dot)com>, 曾文旌(义从) <wenjing(dot)zwj(at)alibaba-inc(dot)com>, 窦贤明(执白) <xianming(dot)dxm(at)alibaba-inc(dot)com>, 萧少聪(铁庵) <shaocong(dot)xsc(at)alibaba-inc(dot)com>, 陈新坚(惧留孙) <xinjian(dot)chen(at)alibaba-inc(dot)com>
Subject: Re: 答复:[HACKERS] 答复:[HACKERS] about fsync in CLOG buffer write
Date: 2015-09-08 18:28:04
Message-ID: 20150908182804.GI5084@alap3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On 2015-09-08 15:58:26 +0800, 周正中(德歌) wrote:
> postgres(at)digoal-> cat 7.sql
> select txid_current();
>
> postgres(at)digoal-> pgbench -M prepared -n -r -P 1 -f ./7.sql -c 1 -j 1 -T 100000
> About 32K tps.
> progress: 240.0 s, 31164.4 tps, lat 0.031 ms stddev 0.183
> progress: 241.0 s, 33243.3 tps, lat 0.029 ms stddev 0.127

So you're benchmarking how fast you can assign txids. Is that actually
something meaningful? If you have other writes interleaved you'll write
much more WAL, so there'll be checkpoints and such.

FWIW, if you measure something realistic and there's checkpoints,
there'll be fewer fsyncs if you increase the slru buffer size - as
there'll often be clean buffers due to the checkpoint having written
them out.

Greetings,

Andres Freund

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2015-09-08 18:30:19 Re: Speed up Clog Access by increasing CLOG buffers
Previous Message Alexander Korotkov 2015-09-08 18:27:42 Re: Use pg_rewind when target timeline was switched