LXC agregate file size significantly differs from zfs list and du -sh report

Sasha

Well-Known Member
Oct 18, 2018
86
1
48
Kazahstan
Hi, guys.
I'm really in stuck how is it possible. zfs list shows
Code:
NAME                           USED  AVAIL     REFER  MOUNTPOINT
...
rpool/data/subvol-101-disk-3   427G   273G      427G  /rpool/data/subvol-101-disk-3
...
and df -h inside LXC 101 shows
Filesystem Size Used Avail Use% Mounted on
rpool/data/subvol-101-disk-3 700G 429G 272G 62% /var/www/files.local (storage mount point)

But correct files volume itself over 700G
1674915661752.png
 
Last edited:
Try zfs list -o space for additional info. And keep in mind that ZFS also does block level compression by default.
 
Last edited:
  • Like
Reactions: Sasha
I guess You are right about compression! Just look at this:
Code:
root@hq:~# zfs get compression rpool/data/subvol-101-disk-3
NAME                          PROPERTY     VALUE           SOURCE
rpool/data/subvol-101-disk-3  compression  on              inherited from rpool

root@hq:~# zfs get compressratio rpool/data/subvol-101-disk-3
NAME                          PROPERTY       VALUE  SOURCE
rpool/data/subvol-101-disk-3  compressratio  1.69x  -

It's interesting to figure out a cost of that... I mean performance cost...
 
Last edited:
"Compresson=on" is using LZ4 as algorhithm. There usually is no noticeable performance penalty when using it with SATA/SAS disks. ZFS also doesn't compress everything. It tries to compress blocks of a file and if that file isn't well compressable, it will skip the compression for those blocks. And LZ4 doesn't got a huge compression efficieny but it is super fast and needs very few CPU ressources. So unless you run some super fast NVMe SSDs and see a bottleneck there, it is usually best to keep LZ4 compression enabled.
 
  • Like
Reactions: Sasha

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!