Cloud disks, such as Google Cloud's, are billed by the size you provision, so storing fewer bytes should cost less. ZFS, a file system that runs on Linux through OpenZFS, can compress data as it writes it. This article explains when that saves money, what it costs in CPU, and how ZFS decides what to compress.
Contents
Disks are billed by size, and they only grow
Putting numbers on the saving
How ZFS organizes data
Follow a write
Two rules decide the real saving
Follow a read
Before choosing a codec
Sources
Disks are billed by size, and they only grow
On Google Cloud, you pay for the disk size you ask for, not for the data you put on it so if you provision a 200 GB disk, you are billed for that entire disk space, regardless of how you use it ( pricing ). And a disk can only grow. You can't reduce the size of a disk; to shrink one, you replace it with a smaller one ( resize docs ).…