The compression process
The compression process uses zEDC Express. The average amount of disk space that is saved per file averages approximately 65%, depending on the type of data that is being compressed.
If you cancel a compression that is in progress, the zFS file system will remain partially compressed. In a partially compressed file system, new files may or may not be compressed. You can resume the compression later with another zfsadm compress command.
The compression process is not mandatory. If the compression of a file does not reduce space, the file is left in its uncompressed format.
- Do not enable compression for any file system until you migrate all of your systems to z/OS
V2R3. All systems in a sysplex must be at least z/OS V2R3 before any file systems are compressed
because compression is not supported prior to z/OS V2R3. Also, do not use compression until you know
that no system will be regressed to a prior release.
Compressed file systems cannot be mounted on a release prior to V2R3.
Therefore, if there is no zFS system in the shared file system environment that is eligible to own a
compressed file system, the file system will be inaccessible.
Decompression is supported if there are pre-V2R3 systems in the sysplex in order to allow the compression to be backed out.
- Only files larger than 8 K can be compressed. Directories and other control information inside the zFS file system are not compressed.
- You cannot compress or decompress an aggregate that is in a partially encrypted or partially decrypted state. In other words, if an encryption or decryption process was stopped for an aggregate, you cannot compress or decompress that aggregate until after the encryption or decryption is completed.
Defining a new file system that is always compressed
The IOEFSPRM configuration option format_compression=on indicates a global default that is used by all formatting methods when determining the default compression behavior while formatting a new file system. This global compression default can be overridden by specifying the -nocompress keyword.
If IOEFSPRM configuration option format_compression=off is specified, all formatting methods can explicitly specify the -compress keyword to format the file system with compression.
//ZDEFFMT JOB ,'DEF FORMAT COMPRESS',
// MSGCLASS=H,
// CLASS=A,
// TIME=(1440),MSGLEVEL=(1,1)
//*---------------------------------------------------
//* DEFINE FORMAT COMPRESS
//*---------------------------------------------------
//*
//DEFINE EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=H
//SYSUDUMP DD SYSOUT=H
//AMSDUMP DD SYSOUT=H
//DASD0 DD DISP=OLD,UNIT=3390,VOL=SER=SMBRS3
//SYSIN DD *
DEFINE CLUSTER (NAME(SUIMGNS.HIGHRISK.TEST) -
ZFS CYL(2 0) SHAREOPTIONS(3))
/*
//CREATE EXEC PGM=IOEFSUTL,REGION=0M,
// PARM=('format -aggregate SUIMGNS.COMPRESS.TEST -compress')
//SYSPRINT DD SYSOUT=H
//STDOUT DD SYSOUT=H
//STDERR DD SYSOUT=H
//SYSUDUMP DD SYSOUT=H
//CEEDUMP DD SYSOUT=H
zfsadm format -aggregate PLEX.DCEIMGNJ.ENC -compress
IOEZ00077I HFS-compatibility aggregate PLEX.DCEIMGNJ.ENC was successfully created.
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.
- 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.
- 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.
- 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.
- 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.
zfsadm compress -aggregate PLEX.DCEIMGNJ.BIGENC
IOEZ00899I Aggregate PLEX.DCEIMGNJ.BIGENC is successfully 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
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:Monitoring and displaying the compression status
Use the zfsadm fsinfo command to monitor the compression status. To display the compression status, use either zfsadm fileinfo or zfsadm fsinfo.
zfsadm fsinfo -aggregate PLEX.DCEIMGNJ.BIGENC
File System Name: PLEX.DCEIMGNJ.BIGENC
*** owner information ***
..........
Status: RW,RS,NE,CI
...
...
Compress Progress: running, 48% started at Nov 21 16:34:40 2016 task 57F5E0
...
Legend: RW=Read-write, RS=Mounted RWSHARE, NE=Not encrypted
CI=Partially compressed
zfsadm fsinfo -aggregate PLEX.DCEIMGNJ.BIGENC -basic
PLEX.DCEIMGNJ.BIGENC DCEIMGNJ RW,RS,EI,CO
Legend: RW=Read-write, RS=Mounted RWSHARE, EI=Partially Encrypted
CO=Compressed
The following example uses zfsadm query with the -compress option to monitor the compression effectiveness and performance of zEDC services.
zfsadm query -compress
Compression calls: 246428 Avg. call time: 0.177
KB input 13190960 KB output 1971456
Decompression calls: 509140 Avg. call time: 0.154
KB input 4073128 KB output 21406072
zfsadm fileinfo /tst/myfile
path: /tst/myfile
*** global data ***
...
mtime Nov 2 11:21:01 2015 atime Nov 2 11:21:01 2015
ctime Nov 2 11:21:01 2015 create time Nov 2 11:21:01 2015
reftime none
not encrypted compressed 4762K saved