activate compression

AxelTwin

Well-Known Member
Oct 10, 2017
133
6
58
39
Hi everybody,

Quick questions about compression:

- is it harmfull if I enable compression zfs compression on a pool with running vm on it ?
- Will it have a big impact on disk IO and on RAM usage ?
- any downside for enabling compression ?
 
Hi,
- is it harmfull if I enable compression zfs compression on a pool with running vm on it ?
No, the VM doesn't know what ZFS does with its data in the background. The I/O interface doesn't change. Also, if you enable compression, it won't affect existing data, only newly written one. Since ZFS is a copy-on-write filesystem modified data is written to new blocks which are then compressed. If you want to compress existing data, cloning the dataset after enabling compression should work.
- Will it have a big impact on disk IO and on RAM usage ?
- any downside for enabling compression ?
It really depends on what your setup is. For compression, the CPU is the bottleneck, but the lz4 algorithm is pretty fast. If the data can be compressed as fast as it comes in, it can even improve disk I/O since fewer blocks have to be written. I don't think the RAM usage will increase all that much, since once a block is compressed and passed to I/O, the RAM used for that block should be free again.
To test it, you could always create a new filesystem in your pool and enable compression for it.
 
  • Like
Reactions: AxelTwin

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!