Re: pglz compression performance, take two - Mailing list pgsql-hackers

From Andrey Borodin
Subject Re: pglz compression performance, take two
Date
Msg-id D75ABE30-2AAA-47DB-A89F-665E03BAAD2A@yandex-team.ru
Whole thread Raw
In response to pglz compression performance, take two  (Andrey Borodin <x4mmm@yandex-team.ru>)
Responses Re: pglz compression performance, take two
List pgsql-hackers

> 9 дек. 2020 г., в 12:44, Andrey Borodin <x4mmm@yandex-team.ru> написал(а):
> PFA the patch with some editorialisation by me.
> I saw some reports of bottlenecking in pglz WAL compression [1].

I've checked that on my machine simple test
echo "wal_compression = on" >> $PGDATA/postgresql.conf
pgbench -i -s 20 && pgbench -T 30
shows ~2-3% of improvement, but the result is not very stable, deviation is comparable. In fact, bottleneck is just
shiftedfrom pglz, thus impact is not that measurable. 

I've found out that the patch continues ideas from thread [0] and commit 031cc55 [1], but in much more shotgun-surgery
way.
Out of curiosity I've rerun tests from that thread
postgres=# with patched as (select testname, avg(seconds) patched from testresults0 group by testname),unpatched as
(selecttestname, avg(seconds) unpatched from testresults group by testname) select * from unpatched join patched using
(testname);
     testname      |       unpatched        |        patched
-------------------+------------------------+------------------------
 512b random       |     4.5568015000000000 |     4.3512980000000000
 100k random       | 1.03342300000000000000 | 1.00326200000000000000
 100k of same byte |     2.1689715000000000 |     2.0958155000000000
 2k random         |     3.1613815000000000 |     3.1861350000000000
 512b text         |     5.7233600000000000 |     5.3602330000000000
 5k text           |     1.7044835000000000 |     1.8086770000000000
(6 rows)


Results of direct call are somewhat more clear.
Unpatched:
     testname      |   auto
-------------------+-----------
 5k text           |  1100.705
 512b text         |   240.585
 2k random         |   106.865
 100k random       |     2.663
 512b random       |   145.736
 100k of same byte | 13426.880
(6 rows)

Patched:
     testname      |   auto
-------------------+----------
 5k text           |  767.535
 512b text         |  159.076
 2k random         |   77.126
 100k random       |    1.698
 512b random       |   95.768
 100k of same byte | 6035.159
(6 rows)

Thanks!

Best regards, Andrey Borodin.


[0] https://www.postgresql.org/message-id/flat/5130C914.8080106%40vmware.com
[1] https://github.com/x4m/postgres_g/commit/031cc55bbea6b3a6b67c700498a78fb1d4399476


pgsql-hackers by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: Insert Documentation - Returning Clause and Order
Next
From: James Coleman
Date:
Subject: Re: Insert Documentation - Returning Clause and Order