MatthewSteinhoff
Guru
- Joined
- Feb 2, 2016
- Messages
- 574
TL;DR: even when performance doesn't matter and disk space is relatively tight, use lz4 because gzip-9 doesn't save enough space to matter and is a CPU hog. (Assuming our data set.)
We use lz4 compression for our source pools: quick and efficient even though a large portion of our data is not compressible (JPEGs, PDFs). We replicate hourly during the day to an older, less powerful server. A large snapshot is 150 MiB. Most are half that.
Since we're not especially concerned with performance of the target FreeNAS server and have half the number of drive slots as our primary, we looked at what using gzip-9 instead of lz4 would do for our space utilization. Even if replication time doubled, if we could save a meaningful amount of space over lz4, it would be worth the compression change.
We created new volumes so all replicated data would be compressed using gzip-9 and started the replication stream. Immediately, the replication side CPU (dual Xeon E5430) swamped and we hit 700mbps instead of a more typical 850mpbs (gigabit NICs). The source FreeNAS server (Xeon E3-1230, 10-gig) saw 20% CPU utilization so it wasn't even breaking a sweat.
For our data, the best-case scenario is an 8% savings by going gzip-9 instead of lz4 at a huge CPU cost and a loss of 150mpbs. For our primary data set, the savings was just 2%. Going into the test, we guessed that an additional 10% savings would be the point where we'd go gzip.
With more compressible data, gzip-9 might be worth the performance hit. For a 2% savings, I'd rather stick with the recommended lz4 (more heavily tested, deployed and bug free I hope) and have our two systems match configurations.
Finally: I love FreeNAS replication. So easy to setup. So amazingly efficient. So much better than the home-rolled system we had been using.
Cheers,
Matt
We use lz4 compression for our source pools: quick and efficient even though a large portion of our data is not compressible (JPEGs, PDFs). We replicate hourly during the day to an older, less powerful server. A large snapshot is 150 MiB. Most are half that.
Since we're not especially concerned with performance of the target FreeNAS server and have half the number of drive slots as our primary, we looked at what using gzip-9 instead of lz4 would do for our space utilization. Even if replication time doubled, if we could save a meaningful amount of space over lz4, it would be worth the compression change.
We created new volumes so all replicated data would be compressed using gzip-9 and started the replication stream. Immediately, the replication side CPU (dual Xeon E5430) swamped and we hit 700mbps instead of a more typical 850mpbs (gigabit NICs). The source FreeNAS server (Xeon E3-1230, 10-gig) saw 20% CPU utilization so it wasn't even breaking a sweat.

For our data, the best-case scenario is an 8% savings by going gzip-9 instead of lz4 at a huge CPU cost and a loss of 150mpbs. For our primary data set, the savings was just 2%. Going into the test, we guessed that an additional 10% savings would be the point where we'd go gzip.
With more compressible data, gzip-9 might be worth the performance hit. For a 2% savings, I'd rather stick with the recommended lz4 (more heavily tested, deployed and bug free I hope) and have our two systems match configurations.
Finally: I love FreeNAS replication. So easy to setup. So amazingly efficient. So much better than the home-rolled system we had been using.
Cheers,
Matt