Skip to Content

What Is ZFS Compression?

To store more data on a ZFS file system, the ZFS compression strategy is a lightweight feature that works specifically on Linux-based servers. You can use ZFS on Linux operating systems such as Solaris, MacOS, Ubuntu, and FreeBSD. Network attached storage (NAS) administrators can use ZFS compression on systems such as TrueNAS.

What Is ZFS Compression?

Administrators can use ZFS compression quickly using a few commands, and the tool will reduce the storage size necessary to save data. The goal is to reduce file storage and allow additional data to be stored on the device. ZFS compression is specifically designed for the ZFS file system available on Linux-based machines.

The ZFS compression tool tells you exactly how much space you save after compressing files. Using the statistics, administrators can identify if compressed files are saving enough space to make it worth their while to continue using compression. For large enterprise servers, it’s generally beneficial to use compression to save money and resources.

How ZFS Compression Works

ZFS compression is completely invisible to the user, so only administrators are aware of file compression. Although using compression increases resource usage, users should not see a change in storage speed. It’s important to note that files themselves are not compressed. Instead, ZFS compression compresses based on record. A record in file storage is a collection of files.

When a file is saved, the file itself is not compressed, but the record is initially compressed before being stored. If ZFS cannot compress the file, the file is stored in its uncompressed form to avoid losing data. The amount of compression is set using various algorithms. For example, the lz4 compression algorithm uses a ratio of 1.61. The gzip algorithm uses a ratio of 2.27. Administrators can also set their own compression rate.

Benefits of Using ZFS Compression

The biggest benefit of using ZFS compression is the savings on storage space. With compression, you can store more data in the same amount of storage space. A company can save money on infrastructure by not having to buy more storage space.  

Cost savings is often the indirect benefit most corporations experience. With large NAS environments, compression can save several gigabytes in storage. Storage is expensive, so using ZFS compression can save corporations thousands in additional hardware and infrastructure costs.

How to Enable ZFS Compression

Administrators first need to enable ZFS compression. Operating systems disable ZFS compression by default. Here’s an example command to enable ZFS compression on Ubuntu:

zfs set compression=lz4 newvol

Notice that compression is configured for “newvol.” Data stored on this volume will be compressed. You should change the name of “newvol” to your own volume name to enable compression. You can always disable ZFS compression later if you determine that it’s slowing down system performance.

Common Use Cases for ZFS Compression

Enterprise storage is usually a distributed system using a NAS. Administrators with large storage silos can save several gigabytes of storage. They reduce the amount of space being used, so users can save more files without notifications that they have no more storage space available. 

Using compression takes a toll on computing resources, so administrators should test their environment before deploying ZFS compression to all storage devices. Administrators will see a spike in CPU usage, even in environments with plenty of computing power. As long as the server environment can handle the increase in CPU usage, the savings on storage costs will offset the CPU expense.

Conclusion

For corporations with high storage costs, using ZFS compression can help reduce those costs. ZFS compression is only available for Linux systems, so Windows administrators must work with a different compression algorithm. The ZFS compression algorithm is mainly used in enterprise applications where NAS and distributed storage is used.

Pure Storage supports cost savings and energy savings from compression. Learn how our Purity operating environment and FlashArray™ systems can fit in with your ZFS compression strategies.

03/2025
Automating Distribution Centers with All-Flash
Discover why Carozzi chose Pure Storage to meet the data demands of automating its distribution center with automated guided vehicles.
고객 사례
3 pages
연락처
퓨어스토리지에 문의하기Info icon
Chat icon
질문하기

퓨어스토리지 제품이나 인증 관련 질문이나 코멘트가 있으신가요?   저희가 도와드립니다.

Key icon
데모 예약

라이브 데모를 예약하고 퓨어스토리지가 데이터를 어떻게 강력한 결과로 전환해주는지 직접 확인해 보세요. 

연락하기: +82 2 6001-3330

언론홍보팀:  pr@purestorage.com

 

퓨어스토리지코리아 주소

30F 아셈타워,

517 영동대로,

강남구, 서울

대한민국

korea@purestorage.com

닫기
닫기Close X icon
지원하지 않는 브라우저입니다.

오래된 브라우저는 보안상 위험을 초래할 수 있습니다. 최상의 경험을 위해서는 다음과 같은 최신 브라우저로 업데이트하세요.