[PVE-User] sparse and compression

Fabian Grünbichler f.gruenbichler at proxmox.com
Mon Dec 11 14:17:31 CET 2017


On Mon, Dec 11, 2017 at 01:40:28PM +0100, Miguel González wrote:
> Dear all,
> 
>  Is it advisable to use sparse on ZFS pools performance wise? And
> compression? Which kind of compression?

sparse just tells ZFS to not reserve space, it does not make a
difference performance wise. if you do over provision and attempt to use
more space than you actuall have, you can corrupt volumes / run into I/O
errors though, like with most storages.

compression is advisable, it costs (almost) nothing and usually
increases performance and saves space. the default (on which is lz4) is
fine.

> 
>  Can I change a zpool to sparse on the fly or do I need to turn off all
> VMs before doing so?

sparse will only affect newly created volumes. you can "convert" sparse
volumes to fully reserved ones and vice versa manually though.

compression only affects data written after it has been enabled, and
already written data stays compressed if you turn it off again. if you
want to fully switch from compressed to uncompressed or vice versa, you
need to re-write all the data.

> 
>  Why a virtual disk shows as 60G when originally It was 36 Gb in raw format?
> 
>  NAME                       USED  AVAIL  REFER  MOUNTPOINT
>  rpool/data/vm-102-disk-1  60.0G  51.3G  20.9G  -

wild guess - you are using raidz of some kind? ashift is set to 12 /
auto-detected?




More information about the pve-user mailing list