[pbs-devel] [RFC proxmox-backup 1/2] datastore: Allow encoding with a set compression level

Maximiliano Sandoval m.sandoval at proxmox.com
Mon Nov 6 11:12:45 CET 2023


Thomas Lamprecht <t.lamprecht at proxmox.com> writes:

> On 03/11/2023 16:17, Maximiliano Sandoval R wrote:
>> We replace the boolean flag with an enum.
>>
>
> so what levels did you test (with what test cases), which difference
> in size was seen, any runtime impacts ...?

I tested with the Linux kernel source from `git clone --depth=1` as of
d2f51b3516dade79269ff45eae2a7668ae711b25 and the COCO dataset (2017
validation set) with no compression, and zstd levels 1,3, and 5.

The output is

```
$ ./target/debug/proxmox-backup-client backup --compression=none root.pxar:PATH/linux --repository=pbs:linux-none
Starting backup: host/hostname/2023-11-06T09:53:33Z
Client name: hostname
Starting backup protocol: Mon Nov  6 10:53:35 2023
No previous manifest available.
Upload directory 'PATH/linux' to 'pbs:linux-none' as root.pxar.didx
root.pxar: had to backup 1.55 GiB of 1.55 GiB (compressed 1.55 GiB) in 119.67s
root.pxar: average backup speed: 13.265 MiB/s
Uploaded backup catalog (1.802 MiB)
Duration: 126.73s
End Time: Mon Nov  6 10:55:42 2023

$ ./target/debug/proxmox-backup-client backup --compression=zstd,1 root.pxar:PATH/linux --repository=pbs:linux-zstd1
Starting backup: host/hostname/2023-11-06T09:56:14Z
Client name: hostname
Starting backup protocol: Mon Nov  6 10:56:14 2023
No previous manifest available.
Upload directory 'PATH/linux' to 'pbs:linux-zstd1' as root.pxar.didx
root.pxar: had to backup 1.55 GiB of 1.55 GiB (compressed 475.468 MiB) in 118.96s
root.pxar: average backup speed: 13.345 MiB/s
Uploaded backup catalog (1.802 MiB)
Duration: 120.80s
End Time: Mon Nov  6 10:58:15 2023

$ ./target/debug/proxmox-backup-client backup --compression=zstd,3 root.pxar:PATH/linux --repository=pbs:linux-zstd3
Starting backup: host/hostname/2023-11-06T09:59:13Z
Client name: hostname
Starting backup protocol: Mon Nov  6 10:59:13 2023
No previous manifest available.
Upload directory 'PATH/linux' to 'pbs:linux-zstd3' as root.pxar.didx
root.pxar: had to backup 1.55 GiB of 1.55 GiB (compressed 449.656 MiB) in 119.39s
root.pxar: average backup speed: 13.297 MiB/s
Uploaded backup catalog (1.802 MiB)
Duration: 120.78s
End Time: Mon Nov  6 11:01:13 2023

$ ./target/debug/proxmox-backup-client backup --compression=zstd,5 root.pxar:PATH/linux --repository=pbs:linux-zstd5
Starting backup: host/hostname/2023-11-06T10:01:24Z
Client name: hostname
Starting backup protocol: Mon Nov  6 11:01:24 2023
No previous manifest available.
Upload directory 'PATH/linux' to 'pbs:linux-zstd5' as root.pxar.didx
root.pxar: had to backup 1.55 GiB of 1.55 GiB (compressed 429.919 MiB) in 119.99s
root.pxar: average backup speed: 13.23 MiB/s
Uploaded backup catalog (1.802 MiB)
Duration: 121.30s
End Time: Mon Nov  6 11:03:25 2023

$ ./target/debug/proxmox-backup-client backup --compression=none root.pxar:PATH/val2017 --repository=pbs:coco-none
Starting backup: host/hostname/2023-11-06T10:04:28Z
Client name: hostname
Starting backup protocol: Mon Nov  6 11:04:28 2023
No previous manifest available.
Upload directory 'PATH/val2017' to 'pbs:coco-none' as root.pxar.didx
root.pxar: had to backup 777.579 MiB of 777.579 MiB (compressed 777.581 MiB) in 58.80s
root.pxar: average backup speed: 13.223 MiB/s
Uploaded backup catalog (126.99 KiB)
Duration: 65.13s
End Time: Mon Nov  6 11:05:33 2023

$ ./target/debug/proxmox-backup-client backup --compression=zstd,1 root.pxar:PATH/val2017 --repository=pbs:coco-zstd1
Starting backup: host/hostname/2023-11-06T10:06:40Z
Client name: hostname
Starting backup protocol: Mon Nov  6 11:06:40 2023
No previous manifest available.
Upload directory 'PATH/val2017' to 'pbs:coco-zstd1' as root.pxar.didx
root.pxar: had to backup 777.579 MiB of 777.579 MiB (compressed 772.769 MiB) in 58.54s
root.pxar: average backup speed: 13.284 MiB/s
Uploaded backup catalog (126.99 KiB)
Duration: 64.88s
End Time: Mon Nov  6 11:07:45 2023

$ ./target/debug/proxmox-backup-client backup --compression=zstd,3 root.pxar:PATH/val2017 --repository=pbs:coco-zstd3
Starting backup: host/hostname/2023-11-06T10:07:54Z
Client name: hostname
Starting backup protocol: Mon Nov  6 11:07:54 2023
No previous manifest available.
Upload directory 'PATH/val2017' to 'pbs:coco-zstd3' as root.pxar.didx
root.pxar: had to backup 777.579 MiB of 777.579 MiB (compressed 770.425 MiB) in 58.70s
root.pxar: average backup speed: 13.247 MiB/s
Uploaded backup catalog (126.99 KiB)
Duration: 64.85s
End Time: Mon Nov  6 11:08:59 2023

$ ./target/debug/proxmox-backup-client backup --compression=zstd,5 root.pxar:PATH/val2017 --repository=pbs:coco-zstd5
Starting backup: host/hostname/2023-11-06T10:09:12Z
Client name: hostname
Starting backup protocol: Mon Nov  6 11:09:13 2023
No previous manifest available.
Upload directory 'PATH/val2017' to 'pbs:coco-zstd5' as root.pxar.didx
root.pxar: had to backup 777.579 MiB of 777.579 MiB (compressed 770.388 MiB) in 59.20s
root.pxar: average backup speed: 13.134 MiB/s
Uploaded backup catalog (126.99 KiB)
Duration: 65.24s
End Time: Mon Nov  6 11:10:18 2023
```

One thing that sticks out is "had to backup 1.55 GiB of 1.55 GiB
(compressed 1.55 GiB)..." when there is no compression, this should be
addressed in v2.


--
Maximiliano





More information about the pbs-devel mailing list