Question: how to change lower priority options for an existing VDOPoolLV Ubuntu 22.04?
Environment:
- Ubuntu 22.04 (5.15.0-91-generic)
- LVM version: 2.03.11-2.1ubuntu4
- VDO version: 8.2.2.2
- KVDO version: 8.2.3.3
I'm trying to change the existing VDOPoolLV lower priority options on Ubuntu 22.04. These are the options like vdo_bio_threads, vdo_cpu_threads and others using the lvchange --vdosettings 'bio_threads=2 deduplication=1' vg/vdopool0 command. I have used this article: https://man7.org/linux/man-pages/man7/lvmvdo.7.html
However, it responds with unrecognized option '--vdosettings'. lvchange works just fine with higher priority options like deduplication or compression: lvchange --compression n vg/vdopool0
I have tried multiple syntax options but none of them worked. I have also tried changing the profile for an existing VDOPoolLV with lvchange --profile vdo-small gd/vdopool0 but despite the output shows that the command was executed successfully, the options don't actually change. All of the above doesn't work even if I stop the VDOPoolLV before trying to apply the changes.
It seems that lvchange works only for higher priority options like deduplication or compression.
Does someone know if there is any way or proper syntax for changing the lower priority options for an existing running or stopped VDOPoolLV ?
Hi @jtblck90. I'm looking into this issue and will get back to you soon.
Hi @bjohnsto . I have done some other testing and it seems that it's not possible to disable deduplication and compression as well.
Tests I have performed:
On the existing vdopool created using the following command: lvcreate --vdo -n vdo-ba -L 11T -V 13T --config 'allocation/vdo_cpu_threads=4 allocation/vdo_ack_threads=4 allocation/vdo_bio_threads=4 allocation/vdo_logical_threads=4 allocation/vdo_physical_threads=4 allocation/vdo_hash_zone_threads=2 allocation/vdo_block_map_cache_size_mb=2048' vgmd0/vdotestpool, I have tried to disable the deduplication using the following command: lvchange --deduplication n vgmdo/vdotestpool the output shows: Logical volume vgmd0/vdotestpool changed. I have also tried disabling compression using a similar command: lvchange --compression n vgmdo/vdotestpool and the output shows Logical volume vgmd0/vdotestpool already uses --compression n. I have verified that the compression and deduplication is indeed disabled by using the following commands: lvs -o+vdo_compression and lvs -o+vdo_deduplication. Both show nothing under the deduplication and compression columns which should mean that deduplication and compression are disabled which is about right.
I have then formatted the VDO volume with xfs and mounted it. However, when I write a 300G file with FIO utility with the parameter --dedupe_percentage=95 , vdostats show the deduplication savings of around 85% which means that deduplication (and probably compression) are still turned on and running. I have tried writing several more FIO files and with --dedupe_percentage=95 parameter, they all get deduplicated. Only if I write a file with FIO with --dedupe_percentage=0 , then the full file size is written. Same behavior continues even if I stop and start the vdopool.
After this, I have removed the vdopool (discard completed) and created a fresh new vdopool using the following command:
lvcreate --vdo -n vdo-ba -L 11T -V 13T --config 'allocation/vdo_use_compression=0 allocation/vdo_use_deduplication=0 allocation/vdo_cpu_threads=4 allocation/vdo_ack_threads=4 allocation/vdo_bio_threads=4 allocation/vdo_logical_threads=4 allocation/vdo_physical_threads=4 allocation/vdo_hash_zone_threads=2 allocation/vdo_block_map_cache_size_mb=2048' vgmd0/vdopool. Again, I have verified that deduplication and compression are disabled using the commands mentioned above and the output shows nothing under deduplication and compression columns (they otherwise show enabled). I have ran the same FIO test with --dedupe_percentage=95 and I still get deduplication savings of around 85% which means that deduplication (and probably compression) are always running despite creating a new vdopool with these parameters disabled.
I have done same tests on another system:
- CentOS Stream 9 (5.14.0-404.el9.x86_64)
- LVM version: 2.03.21(2) (2023-04-21)
- VDO version: 8.2.2.2
- KVDO version: 8.2.3.3
Using the same commands to disable deduplication and compression and trying to write a file with FIO with --dedupe_percentage=95 results in the same behavior which means that deduplication (and compression?) are still running.
Could you please take a look at this as well? Perhaps I'm missing something or using wrong commands? Also, are there any news on the previous question? Really appreciate your input on this subject!
Hi @jtblck90. Sorry for the delay. I've gone through the logs of LVM2 and there are some fixes to the --vdosettings option in later versions of LVM2. I would suggest, if possible, for you to get a hold of a more recent version of lvm2 (namely 2.03.23) and see if that fixes your issues.
As for the compression/dedupe issue, I need to check on that. I think I know what might be going on but need to confirm with some others. I will get back to you soon.
Hi @jtblck90 I did some checking and have an update on the dedupe / compression issue. Basically when you turn off deduplication, it does so for "most" things, but there is one type of data that will still be dealt with, and that would be all zeroes. So if a 4k block of all zeroes is seen by VDO, we will basically not write those to disk, but take care of them inline. This might be how you are still seeing dedupe even when its turned off. You could probably test this be dd'ing zeroes to the VDO device when dedupe is off.
Hi @bjohnsto Thank you a lot for the updates on this! I will try --vdosettings with a new LVM2 version and will let you know the results. Also, as to the deduplication/compression space savings issue, what you said makes total sense to me since FIO with --dedupe_percentage=95 most likely writes zeroes into the file. I will let you know the results on --vdosettings once I do some tests.
Please re-open if you're still seeing issues.