Re: [REVIEW] Re: Compression of full-page-writes - Mailing list pgsql-hackers
From | Fujii Masao |
---|---|
Subject | Re: [REVIEW] Re: Compression of full-page-writes |
Date | |
Msg-id | CAHGQGwG2LYWn2SR_DBFkaRsgr7R-iif6XSTTED7D+P8-zGkszQ@mail.gmail.com Whole thread Raw |
In response to | Re: [REVIEW] Re: Compression of full-page-writes (Michael Paquier <michael.paquier@gmail.com>) |
Responses |
Re: [REVIEW] Re: Compression of full-page-writes
|
List | pgsql-hackers |
On Wed, Dec 17, 2014 at 1:34 AM, Michael Paquier <michael.paquier@gmail.com> wrote: > > > On Wed, Dec 17, 2014 at 12:00 AM, Michael Paquier > <michael.paquier@gmail.com> wrote: >> >> Actually, the original length of the compressed block in saved in >> PGLZ_Header, so if we are fine to not check the size of the block >> decompressed when decoding WAL we can do without the hole filled with zeros, >> and use only 1 bit to see if the block is compressed or not. > > And.. After some more hacking, I have been able to come up with a patch that > is able to compress blocks without the page hole, and that keeps the WAL > record length the same as HEAD when compression switch is off. The numbers > are pretty good, CPU is saved in the same proportions as previous patches > when compression is enabled, and there is zero delta with HEAD when > compression switch is off. > > Here are the actual numbers: > test_name | pg_size_pretty | user_diff | system_diff > -------------------------------+----------------+-----------+------------- > FPW on + 2 bytes, ffactor 50 | 582 MB | 42.391894 | 0.807444 > FPW on + 2 bytes, ffactor 20 | 229 MB | 14.330304 | 0.729626 > FPW on + 2 bytes, ffactor 10 | 117 MB | 7.335442 | 0.570996 > FPW off + 2 bytes, ffactor 50 | 746 MB | 25.330391 | 1.248503 > FPW off + 2 bytes, ffactor 20 | 293 MB | 10.537475 | 0.755448 > FPW off + 2 bytes, ffactor 10 | 148 MB | 5.762775 | 0.763761 > FPW on + 0 bytes, ffactor 50 | 582 MB | 42.174297 | 0.790596 > FPW on + 0 bytes, ffactor 20 | 229 MB | 14.424233 | 0.770459 > FPW on + 0 bytes, ffactor 10 | 117 MB | 7.057195 | 0.584806 > FPW off + 0 bytes, ffactor 50 | 746 MB | 25.261998 | 1.054516 > FPW off + 0 bytes, ffactor 20 | 293 MB | 10.589888 | 0.860207 > FPW off + 0 bytes, ffactor 10 | 148 MB | 5.827191 | 0.874285 > HEAD, ffactor 50 | 746 MB | 25.181729 | 1.133433 > HEAD, ffactor 20 | 293 MB | 9.962242 | 0.765970 > HEAD, ffactor 10 | 148 MB | 5.693426 | 0.775371 > Record, ffactor 50 | 582 MB | 54.904374 | 0.678204 > Record, ffactor 20 | 229 MB | 19.798268 | 0.807220 > Record, ffactor 10 | 116 MB | 9.401877 | 0.668454 > (18 rows) > > The new tests of this patch are "FPW off + 0 bytes". Patches as well as > results are attached. I think that neither pg_control nor xl_parameter_change need to have the info about WAL compression because each backup block has that entry. Will review the remaining part later. Regards, -- Fujii Masao
pgsql-hackers by date: