Hardware accelerated backup and log file compression
You can achieve hardware compression for backup images and log archive files by using a nest accelerator. Supported options include the NX842 of POWER7+ and higher processors, the NXZLIB of POWER9 or higher processors, and the NXU for Linux® on IBM z Systems® 15 and later versions.
Prerequisites
The following prerequisites apply when you are using the NX842 nest accelerator:
- This solution is supported on AIX®. Minimum AIX level is AIX V7 TL3 SP3.
- Active Memory Expansion (AME) must be licensed but not enabled. This restriction is temporary and not a technical limitation. In addition, Active Memory Sharing (AMS) must be deactivated on the logical partition (LPAR). The NX842 compression units are typically not used for AME on database servers since deep row compression, adaptive compression, and index compression can make memory compression inefficient.
- The CPU must be a POWER7+ or later.
- The following minimum firmware levels are recommended for POWER8: FW820.50, FW830.30 or FW840.40. Remember: If the kernel requirements are met, it is possible to recover by using the backup images and log files that were compressed with
NX842on previous POWER® versions. - The
NX842compression units are typically not used for AME on database servers since deep row compression, adaptive compression, and index compression can make memory compression inefficient.
- The minimum AIX level is AIX
V7.2 TL5 SP3, running on a system equipped with a POWER9 or later CPU. In addition, the firmware level FW940 or later is
required. The Power9
processor needs to run in Power9 mode and not in Power9_base
mode.On AIX, you can use nxstat -S if the ZLIB accelerator is available.
nxstat -SNeed to show
GZIP accelerator available - The Linux on IBM z Systems version must be z15 or higher, running on a system with
a CPU that supports the deflate feature. Check the features line of the
/proc/cpuinfo file to see whether it contains
dflt:
cat /proc/cpuinfo ... features : esan3 zarch stfle msa ldisp eimm dfp edat etf3eh highgprs te vx vxd vxe gs vxe2 vxp sort dflt sie ...
db2pd -osinfo
Operating System Information:
OSName: AIX
NodeName: hotelaix7
Version: 6
Release: 1
Machine: 00C45AC54C00
AME : Disabled
AMS : Disabled
NX842 : Operational
NXZLIB : n/aAdvantages of using this solution
- Fast compression can be achieved through the special hardware compression
units
NX842orNXZLIBon POWER CPUs andNXUon z processors. The general CPU resources are not used for this compression. - The compression algorithm in hardware provides faster compression than the common Db2® compression.
Hardware compression for backup operations
To start a backup that uses either hardware compression or ZLIB compression, it is necessary to specify the library.
backup database databasename compress comprlib libdb2nx842.abackup database databasename compress comprlib libdb2zcompr.soNX842
or ZLIB compression. To achieve this backup compression, the registry variable
DB2_BCKP_COMPRESSION must be set to either
NX842 or ZLIB. After you set the registry variable, issue the
following command: backup database databasename compressThe image is then
compressed by using the selected hardware compression method.Hardware compression for log archive compression
NX842 hardware compression can also be used for log archive compression. To
activate hardware compression for log archive compression, change the database configuration
parameter LOGARCHCOMPR1 or LOGARCHCOMPR2 to
NX842 by running the following command: update database configuration for databasename using LOGARCHCOMPR1 NX842
update database configuration for databasename using LOGARCHCOMPR1 ON
update database configuration for databasename using LOGARCHCOMPR2 NX842NX842 compression, refer to POWER NX842
Compression for Db2.ZLIB
compression can also be used for log archive compression. To activate ZLIB
compression for log archive compression, change the database configuration parameter
LOGARCHCOMPR1 or LOGARCHCOMPR2 to
ZLIB using the following command:
update database configuration for databasename using LOGARCHCOMPR1 ZLIBupdate database configuration for databasename using LOGARCHCOMPR1 ON
update database configuration for databasename using LOGARCHCOMPR2 ZLIB The ZLIB
compression runs with hardware support if the prerequisites are met.Encrypted backup creation using hardware compression for AIX systems
You can create encrypted backups that take advantage of NX842-accelerated compression, using the unified compression and encryption library, libdb2nx842_encr.a. This option is currently available only to users running Db2 on the AIX platform.
$ db2set DB2_BCKP_COMPRESSION=NX842
$ db2 connect to <your database> $ db2 update db cfg using encrlib libdb2nx842_encr.a
Encrypted backup creation using zlib compression
If your database is encrypted and you want to use ZLIB compression, set Db2 to use the compression library for your operating system.
$ db2 connect to <your database> $ db2 update db cfg using encrlib libdb2zcompr_encr.a
For Linux users:
$ db2 connect to <your database> $ db2 update db cfg using encrlib libdb2zcompr_encr.soFor
Windows
users:$ db2 connect to <your database> $ db2 update db cfg using encrlib libdb2zcompr_encr.dll