Re: Enabling Checksums - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: Enabling Checksums
Date
Msg-id 20130325135145.GB17029@momjian.us
Whole thread Raw
In response to Re: Enabling Checksums  (Ants Aasma <ants@cybertec.at>)
Responses Re: Enabling Checksums  (Ants Aasma <ants@cybertec.at>)
List pgsql-hackers
On Fri, Mar 22, 2013 at 05:09:53PM +0200, Ants Aasma wrote:
> To see real world performance numbers I dumped the algorithms on top
> of the checksums patch. I set up postgres with 32MB shared buffers,
> and ran with concurrency 4 select only pgbench and a worst case
> workload, results are median of 5 1-minute runs. I used fletcher as it
> was in the checksums patch without unrolling. Unrolling would cut the
> performance hit by a third or so.
> 
> The worst case workload is set up using
> CREATE TABLE sparse (id serial primary key, v text) WITH (fillfactor=10);
> INSERT INTO sparse (v) SELECT REPEAT('x', 1000) FROM generate_series(1,100000);
> VACUUM ANALYZE sparse;
> 
> The test query itself is a simple SELECT count(v) FROM sparse;
> 
> Results for the worst case workload:
> No checksums:       tps = 14.710519
> Fletcher checksums: tps = 10.825564 (1.359x slowdown)
> CRC checksums:      tps =  5.844995 (2.517x slowdown)
> SIMD checksums:     tps = 14.062388 (1.046x slowdown)
> 
> Results for pgbench scale 100:
> No checksums:       tps = 56623.819783
> Fletcher checksums: tps = 55282.222687 (1.024x slowdown)
> CRC Checksums:      tps = 50571.324795 (1.120x slowdown)
> SIMD Checksums:     tps = 56608.888985 (1.000x slowdown)

Great analysis.  Is there any logic to using a lighter-weight checksum
calculation for cases where the corruption is rare?  For example, we
know that network transmission can easily be corrupted, while buffer
corruption is rare, and if corruption happens once, it is likely to
happen again.

--  Bruce Momjian  <bruce@momjian.us>        http://momjian.us EnterpriseDB
http://enterprisedb.com
 + It's impossible for everything to be true. +



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [COMMITTERS] pgsql: Add PF_PRINTF_ATTRIBUTE to on_exit_msg_fmt.
Next
From: Brendan Jurd
Date:
Subject: Re: [PATCH] Exorcise "zero-dimensional" arrays (Was: Re: Should array_length() Return NULL)