Compression not working with ZFS?

Quindor

Active Member
Jun 15, 2017
7
0
41
45
I'm testing Proxmox 5.0beta2 and I'm seeing oddities that I'm not used to with ZFS.

I've setup a test server which has a ZFS Mirror with 2x256GB SSD's. On top of that volume I've made some LXC containers and VM's.

The LXC containers seem to compress just fine but for some reason the virtual machine mounts for the machines under tank don't compress? That's not what I'm used to, especially because I've created 60GB disks for some VM's and only installed a 20GB Windows install to it.

When I do the same using NFS or iSCSI with VMware, all empty space, even with full provisioning, gets compressed away and thus gives you a form of thin provisioning. This doesn't seem to be the case with Proxmox and ZFS with LZ4 compression?

I have the feeling I'm missing something but I'm used to LZ4 compression working well on basically "empty space".

Here is the output of ZFS GET to show that I indeed have compression enabled:

root@proxmox:/# zfs get all | grep compress
tank compressratio 1.18x -
tank compression lz4 local
tank refcompressratio 1.38x -
tank/subvol-102-disk-1 compressratio 1.74x -
tank/subvol-102-disk-1 compression lz4 inherited from tank
tank/subvol-102-disk-1 refcompressratio 1.74x -
tank/subvol-102-disk-2 compressratio 1.00x -
tank/subvol-102-disk-2 compression lz4 inherited from tank
tank/subvol-102-disk-2 refcompressratio 1.00x -
tank/subvol-104-disk-1 compressratio 1.65x -
tank/subvol-104-disk-1 compression lz4 inherited from tank
tank/subvol-104-disk-1 refcompressratio 1.65x -
tank/subvol-104-disk-2 compressratio 1.00x -
tank/subvol-104-disk-2 compression lz4 inherited from tank
tank/subvol-104-disk-2 refcompressratio 1.00x -
tank/vm-100-disk-1 compressratio 1.01x -
tank/vm-100-disk-1 compression lz4 inherited from tank
tank/vm-100-disk-1 refcompressratio 1.01x -
tank/vm-101-disk-1 compressratio 1.00x -
tank/vm-101-disk-1 compression lz4 inherited from tank
tank/vm-101-disk-1 refcompressratio 1.00x -
tank/vm-101-disk-2 compressratio 1.00x -
tank/vm-101-disk-2 compression lz4 inherited from tank
tank/vm-101-disk-2 refcompressratio 1.00x -
tank/vm-101-disk-3 compressratio 1.00x -
tank/vm-101-disk-3 compression lz4 inherited from tank
tank/vm-101-disk-3 refcompressratio 1.00x -

A zfs list:
root@proxmox:/# zfs list
NAME USED AVAIL REFER MOUNTPOINT
tank 199G 31.7G 36.9G /tank
tank/subvol-102-disk-1 435M 7.58G 435M /tank/subvol-102-disk-1
tank/subvol-102-disk-2 192K 8.00G 192K /tank/subvol-102-disk-2
tank/subvol-104-disk-1 635M 7.38G 635M /tank/subvol-104-disk-1
tank/subvol-104-disk-2 192K 8.00G 192K /tank/subvol-104-disk-2
tank/vm-100-disk-1 61.9G 72.1G 21.5G -
tank/vm-101-disk-1 33.0G 64.7G 128K -
tank/vm-101-disk-2 33.0G 64.7G 128K -
tank/vm-101-disk-3 33.0G 39.0G 25.7G -


To make things even odder, if I look at a higher level, the space doesn't seem to be actually used, and it's using as much as I would expect.
root@proxmox:/# zpool iostat
capacity operations bandwidth
pool alloc free read write read write
---------- ----- ----- ----- ----- ----- -----
tank 85.2G 153G 38 70 496K 746K


Can anyone explain what I'm missing? I see stuff like REFER but if it's working like that, according to proxmox space fills up very quickly and any gains because of compression are unusable?
 
please post your storage configuration (/etc/pve/storage.cfg), and more of the ZFS properties (e.g., something like the output of "zfs list -o name,used,usedbydataset,usedbyrefreservation,logicalused,logicalreferenced,refreservation,volsize,compress,compressratio"). please use code tags to mark the output for better readability.
 
Sorry about the lack of the reply, other projects suddenly had priority and actually cannibalized the machine I was using to test Proxmox. From what I was able to do I really liked it and will return to it in the future but for now this thread can be closed.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!