Re: [REVIEW] Re: Compression of full-page-writes

From: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
To: Rahila Syed <rahilasyed90(at)gmail(dot)com>
Cc: Andres Freund <andres(at)2ndquadrant(dot)com>, Abhijit Menon-Sen <ams(at)2ndquadrant(dot)com>, Rahila Syed <rahilasyed(dot)90(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [REVIEW] Re: Compression of full-page-writes
Date: 2014-08-18 03:24:39
Message-ID: CAHGQGwHytFDBgXuw8WBe=ZqUZ2-=kpKL75DmH8GJDjUbbaM4zA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, Aug 16, 2014 at 6:51 PM, Rahila Syed <rahilasyed90(at)gmail(dot)com> wrote:
>>So, you're compressing backup blocks one by one. I wonder if that's the
>>right idea and if we shouldn't instead compress all of them in one run to
>>increase the compression ratio
>
> Please find attached patch for compression of all blocks of a record
> together .
>
> Following are the measurement results:
>
>
> Benchmark:
>
> Scale : 16
> Command :java JR /home/postgres/jdbcrunner-1.2/scripts/tpcc.js -sleepTime
> 550,250,250,200,200
>
> Warmup time : 1 sec
> Measurement time : 900 sec
> Number of tx types : 5
> Number of agents : 16
> Connection pool size : 16
> Statement cache size : 40
> Auto commit : false
>
>
> Checkpoint segments:1024
> Checkpoint timeout:5 mins
>
>
>
>
> Compression Multiple
> Blocks in one run Single Block in one run
>
> Bytes saved
> 0 0
>
>
>
> OFF WAL generated
> 1265150984(~1265MB) 1264771760(~1265MB)
>
>
>
> % Compression
> NA NA
>
>
>
>
> Bytes saved
> 215215079 (~215MB) 285675622 (~286MB)
>
>
>
> LZ4 WAL generated
> 125118783(~1251MB) 1329031918(~1329MB)
>
>
>
> % Compression 17.2
> % 21.49 %
>
>
>
>
> Bytes saved
> 203705959 (~204MB) 271009408 (~271MB)
>
>
>
> Snappy WAL generated
> 1254505415(~1254MB) 1329628352(~1330MB)
>
>
>
> % Compression 16.23
> % 20.38%
>
>
>
>
> Bytes saved
> 155910177(~156MB) 182804997(~182MB)
>
>
>
> pglz WAL generated
> 1259773129(~1260MB) 1286670317(~1287MB)
>
>
>
> % Compression 12.37%
> 14.21%
>
>
>
>
>
> As per measurement results of this benchmark, compression of multiple blocks
> didn't improve compression ratio over compression of single block.

According to the measurement result, the amount of WAL generated in
"Multiple Blocks in one run" than that in "Single Block in one run".
So ISTM that compression of multiple blocks at one run can improve
the compression ratio. Am I missing something?

Regards,

--
Fujii Masao

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2014-08-18 05:05:30 Re: [PATCH] Incremental backup: add backup profile to base backup
Previous Message Michael Paquier 2014-08-18 03:21:27 Re: option -T in pg_basebackup doesn't work on windows