Hi,
so im currently testing the proxmox backup server für my vms. I was wondering if the deduplication / dirtybit only works with zfs or if it also works on "normal" ext4 formated disks (mounted directory).
Best
Today I played around with some settings in ZFS and Proxmox Backup Server. I use Proxmox Backup Server with a ZFS raidz2 as storage for the Backup space. The ZFS pool was created manually without the proxmox-backup-manager command.
I noticed that the WebUI shows a deduplication factor of (in my case) 94.02 but the zfs pool shows dedupratio 1.00x.
Does Proxmox Backup Server not use ZFS' deduplication functionality? Should I enable deduplication and compression in the ZFS pool? Which compression algorithm should I use?
EDIT: I have tested a bit with ZFS and Proxmox Backup Server for quite a while (both hardware and VMs) and ZFS' deduplication and compression have next to 0 gains. As pointed out by the comments deduplication does not make sense as Proxmox stores backups in binary chunks (mostly of 4MiB) and does the deduplication and most of the compression there. ZFS compression with zstd-12 ended up on a compressratio of 1.02x which is not very significant.
TL;DR It's not necessary to use ZFS compression or deduplication because it's both already handled by Proxmox's way of storing Archives and Block Devices.
I believe they do not use zfs's dedup functionality. It seems they have created their own file format, Proxmox File Archive (.pxar). So they handle deduplication and compression and data transport themselves. ZFS isn't a requirement for datastores. You can create datastores on ext4 for example. They store data at the file level, not block.
So, I would turn off compression because it's probably extraneous for achieves which are already compressed.
PBS only dedups on a per group (container/vm/host) basis. So you will have some data duplicated across groups. So enabling ZFS deduplication may help a little by deduping the whole datastore instead of each individual group. I don't know if it's worth it though, you'll have to test/decide for yourself.
ETA: a word
The PBS does not use ZFS deduplication. PBS dedupe works similar to Windows offline Dedupe. PBS does it on the fly instead of as a scan process like Windows. But with both, files and blocks are broken up into chunks and stored in a chunk store. The chunks are hashed and matching hashes are used to dedupe.
Good Morning everyone!
As the title states, would you be willing to share any useful and positive information you may have around deduplication? Really just looking for some success stories and what you have found to work well in reference to deduplication.
Typically all I ever hear and read about ZFS deduplication is "just don't. and if you think you might benefit, still don't." or "it benefits a very niche workload but not enough to be worth it... so just don't".
I am really curious if anyone has found a good use for it, how successful was it, what has the experience been like, and what configurations (hardware and software) are in use?
Thank you to anyone who is willing to share.
And last, I have a hot downvote for anyone showing up with a "just don't" post...
Hey there,
Do I understand correctly, that zfs does dedup either online or not at all? I would like to dedup offline(out-of-band) maybe once a month but I did not find answer on how to do this in zfs. The system does not have a lot of RAM, so online-dedup is not an option.
I'm using Proxmox at home to host the usual things. One ZFS NVMe pool for all the containers/VMs and one ZFS HDD pool for nightly backups.
I just setup a second PC with TrueNAS for some "just in case" backups of the backups (from PVE and other sources around the house).
Each VM has 1-2 dozen nearly identical backups, so I decided to try ZFS' deduplication feature. I copied over backups for 4 VMs (500G total) and was shocked to see no gains/efficiency from the deduplication, not even 1.01!
Some of those backups are from a VM that was powered off, so the original disk was definitely unchanged. Shouldn't the resulting backups be bit-identical? Does anyone know if Proxmox includes some metadata that might spoil block-level deduplication?
I use ZFS for backup. Performance isn't an issue, so I've enabled deduplication. Will enabling deduplication and compression reduce capacity used further than deduplication alone?
you should definitely enable compression and MAYBE deduplication if you think your scenario warrants it. not the other way around.
and yes, deduplication and compression can work together. but you need to enable them before you copy data onto that volume. enabling compression/deduplication on an already filled volume will have no effect on already stored data.
Assuming your data is already on ZFS, you can calculate your dedupe ratio with 'zdb -S'. I normally would not use dedupe on anything with less than a 16:1 aggregation ratio, mainly because that's achievable with compression. If the aggregation ratio reported by zdb -S is a lot higher than that, you have a good use case to suck up the RAM hit of holding the DDT in RAM.
The use of DDT is also generally a good use case for using L2ARC; the ideal use case is generally something like holding OS images.
I understand dedup can cause performance degradation. I also understand that it can offer performance improvements.
Are the hard demands, CPU & RAM usage, only a concern during write events? If a zvol is born with dedup=verify set but is later removed does the running state of ZFS always consume additional resources for all reads?
I know ZFS deduplication is discouraged, because apparently it takes a lot of RAM and CPU. But 1 GB RAM and 1 CPU core per 1 TB data is not that costly. These days, most PCs and laptops have +16 GB RAM and +8 cores, with 1–2 TB of NVME.
Any problem if I relocate 1 TB to a deduplicated data set on NVMe, with hardware mentioned above? The OS is not deduplicated, just data.
Anyone doing ZFS deduplication here? How much space do you save, what is your RAM, CPU and performance?
Apparently, the savings are not that much either.
Software such as Restic or Borg do deduplication easily, with great speeds and deduplication ratios. I could use these software, but I prefer not to use third party apps.
Update. From the comments, deduplication is continued to be discouraged. The savings are small, not worth the trouble.
Am I correct in that the only benefit of PBS is that it provides a file-level restore? Otherwise, for a single node Proxmox VE, is the built-in backup function sufficient for being able to restore a corrupted VM or CT?
I am planning to use a 2TB external HDD connected via USB and create a backup job within ProxMox VE 8.2.2
Thank you for the advice.