From: | Christoph Berg <myon(at)debian(dot)org> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Enable data checksums by default |
Date: | 2019-03-26 15:14:46 |
Message-ID: | 20190326151446.GG3829@msg.df7cb.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Re: Tom Lane 2019-03-22 <4368(dot)1553270842(at)sss(dot)pgh(dot)pa(dot)us>
> Christoph Berg <myon(at)debian(dot)org> writes:
> > I think, the next step in that direction would be to enable data
> > checksums by default. They make sense in most setups,
>
> Well, that is exactly the point that needs some proof, not just
> an unfounded assertion.
I run a benchmark with checksums disabled/enabled. shared_buffers is
512kB to make sure almost any read will fetch the page from the OS
cache; scale factor is 50 (~750MB) to make sure the whole cluster fits
into RAM.
model name: Intel(R) Core(TM) i7-3770 CPU @ 3.40GHz (8 threads)
alter system set shared_buffers = '512kB';
pgbench -s 50 -i
pgbench -P 5 -M prepared -c 8 -j 8 -T 60 --select-only
without checksums:
tps = 96893.627255 (including connections establishing)
tps = 97570.587793 (including connections establishing)
tps = 97455.484419 (including connections establishing)
tps = 97533.668801 (including connections establishing)
average: 97363
with checksums:
tps = 91942.502487 (including connections establishing)
tps = 92390.556925 (including connections establishing)
tps = 92956.923271 (including connections establishing)
tps = 92914.205047 (including connections establishing)
average: 92551
select 92551.0/97363;
0.9506
So the cost is 5% in this very contrived case. In almost any other
setting, the cost would be lower, I'd think.
Christoph
From | Date | Subject | |
---|---|---|---|
Next Message | Tomas Vondra | 2019-03-26 15:21:08 | Re: [HACKERS] PATCH: multivariate histograms and MCV lists |
Previous Message | Masahiko Sawada | 2019-03-26 15:12:38 | Re: New vacuum option to do only freezing |