<div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">VDO provides block-level deduplication and compression using a 4K block size. The way compression in VDO works is each block that doesn't deduplicate is compressed. The compressed blocks are packed together with a small header into a 4K block. Those packed blocks are written and shared in almost exactly the same way as VDO shares normal 4K data blocks for deduplication.</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><span style="font-size:0.875rem"><br></span></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><span style="font-size:0.875rem">This success of this approach relies on variation in the compressed size of blocks, or on blocks being very compressible. Unfortunately, in your dataset, the compressed size of the </span><span style="font-size:0.875rem">blocks are always between 2K and 3K, so there are no two that VDO can pack together to save space.</span></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><span style="font-size:0.875rem"><br></span></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><span style="font-size:0.875rem">lz4 block compression is not as efficient as the streaming compression you obtained with the lz4 tool, which is why they only shrank to 50% or larger, not the 40% you saw in your test.</span></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, May 12, 2019 at 5:13 PM civic9 <<a href="mailto:civic9@gmail.com">civic9@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi, I created issue on github for this<br>
(<a href="https://github.com/dm-vdo/kvdo/issues/20" rel="noreferrer" target="_blank">https://github.com/dm-vdo/kvdo/issues/20</a>) but this is probably better<br>
place.<br>
<br>
I have a strange problem. VDO don't want to compress some of my CSV files<br>
(which are easy compressible, I think). Command line lz4 tool doesn't<br>
have any problem with them.<br>
<br>
# du /1/test2.csv<br>
102400  /1/test2.csv<br>
<br>
# lz4 -1 /1/test2.csv /1/test2.csv.lz4<br>
Compressed 104857600 bytes into 42259380 bytes ==> 40.30%<br>
<br>
# vdo status -n vdobackup|grep -i Compression<br>
    Compression: enabled<br>
<br>
# vdostats --verbose vdobackup|egrep 'used|compress'<br>
  data blocks used                    : 13056414<br>
  overhead blocks used                : 1292638<br>
  logical blocks used                 : 17262451<br>
  1K-blocks used                      : 57396208<br>
  used percent                        : 27<br>
  compressed fragments written        : 773855<br>
  compressed blocks written           : 305048<br>
  compressed fragments in packer      : 0<br>
  KVDO module bytes used              : 1016029328<br>
  KVDO module peak bytes used         : 1016031648<br>
  KVDO module bios used               : 74572<br>
<br>
# cp /1/test2.csv /mnt/backup/1/; sync<br>
<br>
# vdostats --verbose vdobackup|egrep 'used|compress'<br>
  data blocks used                    : 13082012<br>
  overhead blocks used                : 1292670<br>
  logical blocks used                 : 17288052<br>
  1K-blocks used                      : 57498728<br>
  used percent                        : 27<br>
  compressed fragments written        : 773855<br>
  compressed blocks written           : 305048<br>
  compressed fragments in packer      : 0<br>
  KVDO module bytes used              : 1016029328<br>
  KVDO module peak bytes used         : 1016031648<br>
  KVDO module bios used               : 74572<br>
<br>
As you can see:<br>
"data blocks used" increased by: 25598<br>
"compressed fragments/blocks" are the same.<br>
<br>
No other activity at the same time. It is not the only one file with<br>
this problem.<br>
I have a few GB of files with similar content and none of them is<br>
compressed on the vdo volume.<br>
Compression on other type of files works fine.<br>
<br>
My VDO is created on top of standard disk partition. No LVM, no encryption.<br>
kvdo from rhel/centos:<br>
<br>
# uname -a<br>
Linux .... 3.10.0-957.10.1.el7.x86_64 #1 SMP Mon Mar 18 15:06:45 UTC<br>
2019 x86_64 x86_64 x86_64 GNU/Linux<br>
# rpm -qa|grep -i vdo<br>
vdo-6.1.1.125-3.el7.x86_64<br>
kmod-kvdo-6.1.1.125-5.el7.x86_64<br>
<br>
Test file: <a href="https://github.com/dm-vdo/kvdo/files/3170189/test2.csv.gz" rel="noreferrer" target="_blank">https://github.com/dm-vdo/kvdo/files/3170189/test2.csv.gz</a><br>
<br>
Any ideas?<br>
<br>
_______________________________________________<br>
Vdo-devel mailing list<br>
<a href="mailto:Vdo-devel@redhat.com" target="_blank">Vdo-devel@redhat.com</a><br>
<a href="https://www.redhat.com/mailman/listinfo/vdo-devel" rel="noreferrer" target="_blank">https://www.redhat.com/mailman/listinfo/vdo-devel</a><br>
</blockquote></div>