This repository was archived by the owner on Oct 18, 2023. It is now read-only.
Commit 4db9ff9
committed
bottomless: add xz compression option
Empirical testing shows, that gzip achieves mere x2 compression ratio
even with very simple and repeatable data patterns.
Since compression is very important for optimizing our egress traffic
and throughput in general, .xz algorithm is hereby implemented
as well. Ran with the same data set, it achieved ~x50 compression ratio,
which is orders of magnitude better than gzip, at the cost of elevated
CPU usage.
Note: with more algos implemented, we should also consider adding code
that detects which compression methods was used when restoring a snapshot,
to allow restoring from a gzip file, but continue new snapshots with xz.
Currently, setting the compression methods via the env var assumes
that both restore and backup use the same algorithm.1 parent eb92268 commit 4db9ff9
4 files changed
+57
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
116 | 116 | | |
117 | 117 | | |
118 | 118 | | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
119 | 127 | | |
120 | 128 | | |
121 | 129 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
35 | 39 | | |
36 | 40 | | |
37 | 41 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| |||
653 | 653 | | |
654 | 654 | | |
655 | 655 | | |
656 | | - | |
| 656 | + | |
657 | 657 | | |
658 | 658 | | |
659 | 659 | | |
| |||
671 | 671 | | |
672 | 672 | | |
673 | 673 | | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
| 694 | + | |
674 | 695 | | |
675 | 696 | | |
676 | 697 | | |
677 | | - | |
678 | | - | |
679 | | - | |
680 | | - | |
| 698 | + | |
| 699 | + | |
| 700 | + | |
| 701 | + | |
681 | 702 | | |
682 | 703 | | |
683 | 704 | | |
| |||
816 | 837 | | |
817 | 838 | | |
818 | 839 | | |
819 | | - | |
820 | | - | |
821 | | - | |
| 840 | + | |
| 841 | + | |
| 842 | + | |
| 843 | + | |
822 | 844 | | |
823 | 845 | | |
824 | 846 | | |
| |||
1163 | 1185 | | |
1164 | 1186 | | |
1165 | 1187 | | |
| 1188 | + | |
1166 | 1189 | | |
1167 | 1190 | | |
1168 | 1191 | | |
| |||
1175 | 1198 | | |
1176 | 1199 | | |
1177 | 1200 | | |
| 1201 | + | |
| 1202 | + | |
| 1203 | + | |
| 1204 | + | |
| 1205 | + | |
| 1206 | + | |
1178 | 1207 | | |
1179 | 1208 | | |
1180 | 1209 | | |
| |||
1235 | 1264 | | |
1236 | 1265 | | |
1237 | 1266 | | |
| 1267 | + | |
1238 | 1268 | | |
1239 | 1269 | | |
1240 | 1270 | | |
| |||
1423 | 1453 | | |
1424 | 1454 | | |
1425 | 1455 | | |
| 1456 | + | |
1426 | 1457 | | |
1427 | 1458 | | |
1428 | 1459 | | |
| |||
1670 | 1701 | | |
1671 | 1702 | | |
1672 | 1703 | | |
| 1704 | + | |
1673 | 1705 | | |
1674 | 1706 | | |
1675 | 1707 | | |
1676 | 1708 | | |
1677 | 1709 | | |
1678 | 1710 | | |
1679 | 1711 | | |
| 1712 | + | |
1680 | 1713 | | |
1681 | 1714 | | |
1682 | 1715 | | |
| |||
1687 | 1720 | | |
1688 | 1721 | | |
1689 | 1722 | | |
| 1723 | + | |
1690 | 1724 | | |
1691 | 1725 | | |
1692 | 1726 | | |
0 commit comments