Compressing existing file system data

Use the zfsadm compress command to compress existing file system data. You can cancel compression with the -cancel option and reverse compression with the zfsadm decompress command.

Before file system data can be compressed, these requirements must be met:
  • The file system that contains the data to be compressed must be mounted in read/write mode.
  • To avoid performance issues when the file system data is compressed, ensure that the system has sufficient zEDC capacity. For more information about performance analysis, see z/OS RMF User's Guide.
Important: IBM highly recommends backing up file systems before you begin the compression process.
Tips to improve performance:
  1. If you are compressing data in a zFS aggregate, fixing the user file cache with the edcfixed option often results in CPU savings, especially if enough real memory is available to support fixing the user file cache and compression is used with zFS. If you are not compressing data in a zFS aggregate, then the edcfixed option of the user file cache might slightly reduce the CPU.
  2. The zEDC user cache limit that can be fixed with the edcfixed option is 14 G but might be less, depending on real memory. To determine how much of the user file cache is fixed, use F ZFS,QUERY,VM or zfsadm query -usercache.
  3. For optimum performance, use the health check ZFS_VERIFY_COMPRESSION_HEALTH to determine whether compression is being used and all user cache pages are registered with zEDC Express.
The following example uses the zfsadm compress command to compress the data in an existing aggregate.
zfsadm compress -aggregate  PLEX.DCEIMGNJ.BIGENC
IOEZ00899I Aggregate PLEX.DCEIMGNJ.BIGENC is successfully compressed.
The following example shows a file that was compressed.
# zfsadm  fileinfo  -path  testmtpt/file4                                       
   path: /home/suimgju/C81500/testmtpt/file4                                    
   ***   global data   ***                                                      
   fid                    5,1           anode                  291,1524         
   length                 24960         format                 BLOCKED          
   1K blocks              8             permissions            755              
   uid,gid                0,10          access acl             0,0              
   dir model acl          na            file model acl         na               
   user audit             F,F,F         auditor audit          N,N,N            
   set sticky,uid,gid     0,0,0         seclabel               none             
   object type            FILE          object linkcount       1                
   object genvalue        0             dir version            na               
   dir name count         na            dir data version       na               
   dir tree status        na            dir conversion         na               
   file format bits       0x0,0,0       file charset id        0x0              
   file cver              none          charspec major,minor   na               
   direct blocks          0x00000007    0x80000401    0x80000000    0x80000000  
   indirect blocks        none                                                  
   mtime       Jan 19 12:27:56 2017     atime        Jan 19 12:27:56 2017       
   ctime       Jan 19 12:27:56 2017     create time  Jan 19 12:27:56 2017       
   reftime     none                                                             
   not encrypted                        compressed 24K saved                    
                               
The following example uses the zfsadm compress command with the -cancel option to cancel a compression request.
zfsadm compress -aggregate PLEX.DCEIMGNJ.BIGENC -cancel           
IOEZ00903I Aggregate PLEX.DCEIMGNJ.BIGENC compress or decompress successfully canceled.
Then use zfsadm fsinfo to display the status: