File compression

Use this table to access IBM Spectrum Scale™ documentation for file compression and decompression.

Table 1. Quick reference for file compression and decompression
For this information... Go to...
Differences between file compression and object compression. Comparison with object compression
Start of change
  • File compression with the zlib compression library is intended primarily for cold objects and files.
  • File compression with the lz4 compression library is intended primarily for active data.
End of change
When to use file compression
Use one of the following commands to compress or decompress files:
  • mmchattr
  • mmapplypolicy with a MIGRATE COMPRESS rule
Do not do any of the following operations while an mmrestorefs command is running:
  • File compression or decompression with mmchattr or mmapplypolicy
  • mmrestripefs or mmrestripefile
OS commands display the decompressed size. Reported size of compressed files
  • You can defer file compression or decompression until the file system is not busy.
  • Run mmrestorefs or mmrestorefile to complete the deferred operation.
  • Start of changeCOMPRESSIONEnd of change indicates whether the file is marked for compression or decompression.
  • illCompressed indicates whether the compression or decompression is complete or deferred.
Indicators of file compression or decompression
Writing data to a compressed file decompresses the affected region of the file.
  • You can memory-map a file that is already compressed.
  • File compression avoids compressing a memory-mapped file.
File compression and memory mapping
  • You can open a compressed file for Direct I/O, but internally the reads and writes are decompressed.
  • File compression avoids compressing a file that is opened for Direct I/O.
File compression and direct I/O
  • Files are decompressed when they are moved out of storage that is directly managed by IBM Spectrum Scale.
  • When you restore files to the IBM Spectrum Scale file system, you can run mmrestorefs or mmrestorefile to recompress the files.
Backing up and restoring compressed files
Start of changeFile compression supports a File Placement Optimizer (FPO) environment or horizontal storage pools.End of change FPO environment
Start of changeFiles that belong to AFM and AFM DR filesets can be compressed and decompressed.End of change AFM environment
  • No compression occurs if the space savings is less than 10 per cent.
  • File compression is not supported in some environments.
  • File compression with mmapplypolicy is not supported in Microsoft Windows.