AIX

Performance improvement in openssh with on-chip data compression accelerator in power9

By SWETHA NARAYANA posted Mon August 02, 2021 03:15 PM

  

Introduction:

The IBM Power 9 systems include on-chip data compression accelerator, which reduces the processor cycles for data compression and decompression. To exploit this accelerator, an enhanced ‘zlibNX’ library is available in IBM AIX® 7.2 with Technology Level 4 Expansion Pack, and later. Also, starting with IBM AIX® 7.2 Technology Level 5 Service Pack 2, the zlibNX installation package is available on the AIX base media in addition to the Expansion Pack.

Additional information about zlibNX library is available at:   https://www.ibm.com/docs/en/aix/7.2?topic=management-data-compression-by-using-zlibnx-library

OpenSSH provides the ssh command to establish secure connection to a host. When -C is provided as an option to ssh command then there is a request to compress all data during transfer. For this data compression, openssh was using libz.a library provided in /usr/lib/ path.

Starting with openSSH 8.1.102.2102 version, AIX Openssh has been modified to utilize enhanced ‘zlibNX’ library instead of default libz.a library while executing on AIX 7.2 levels. When this openssh version is installed in AIX 7.2 TL 4 and above levels that is running on a Power 9 hardware, there is a significant gain seen in compression performance due to the on-chip accelerator support. The detail of this gain is shared below.

 

1. Enabling in POWER 9 hardware:

 

In the Power 9 hardware, the on-chip data compression accelerator support is provided by selecting the POWER9 for the ‘Processor compatibility mode’ in the profile as shown below :

 

 

2. Enabling in OpenSSH:

 

In the ssh server, for data compression, a configuration option ‘Compression’ is provided in sshd_config. A value of ‘yes’, ‘no’ or ‘delayed’ can be provided for this option. ‘delayed’ is the default value which means compression will be delayed until the user has authenticated successfully.

After setting the configuration option, the ssh daemon needs to be restarted through the commands:

$ stopsrc -s sshd

$ startsrc -s sshd

 

In the ssh client, to perform the data compression, the -C command line option should be used with ‘ssh’ command.

 

2.1 - Addition option ‘EnableHWCompression’:

 

Till OpenSSH 8.1.102.2101, /usr/ lib/libz.a library was used in ssh server and client setup to provide compression, and there is only software implementation of compression available in this library.

 

From 8.1.102.2103, the compression functionality in openssh has been improved to make use of the enhanced libzNX.a library. This library has both software and hardware implementation of compression, wherein if the underlying hardware has the on-chip compressor accelerator support available then it makes use of this hardware capability.

 

A openssh configuration option has been provided for user to specify if they need software compression or hardware compression. This is done through option “EnableHwCompression” in both sshd_config of server and ssh_config of client. By default this configuration option is set to “no” which means only software compression is used. If this option is set to “yes” in both the config files then hardware compression is done when ssh -C is used while executing on a AIX 7.2 levels on a Power9 hardware with proper ‘Processor compatibility mode’ set.

 

Example:


 

If “EnableHwCompression” is either set to “no” ( or by default) software compression is done when -C is used in the command.

 

Example:


 

3. Performance numbers:

 

Here are the snapshots of performance numbers collected for time taken on transferring 1GB, 2GB, 4GB files on a P9 system with AIX 72Q installed (run on localhost).

Please refer the table below. First 2 options are default values where “Compression” will be set to “delayed”/”yes” in sshd_config file and “EnableHwCompression” is set to “no” in sshd_config and ssh_config both. Last 2 options are with “EnableHwCompression” been set to “yes” in both sshd_config file and ssh_config file along with “Compression” set to “yes” in sshd_config file.

 

On OpenSSH 8.1.102.2103 system, we have both hardware and software compression support. As we can see that First option with “scp -C” (marked in Blue) takes approx.  1min, 2min, 4min for 1GB, 2GB, 4GB files respectively (for software compression). Whereas for second option with “scp -C” (marked in Orange) is taking just 16 sec, 34sec, 71sec for 1GB, 2GB, 4GB files respectively(for hardware compression).

 

Here is the table and the bar graph:



 

  

References:

 

https://www.ibm.com/docs/en/aix/7.2?topic=management-nest-accelerators

 

https://community.ibm.com/community/user/power/blogs/brian-veale1/2020/11/09/power9-g[…]th-ibm-aix?CommunityKey=daa942cb-b783-4fd3-ba27-a2d7462f9530

 

https://www.ibm.com/docs/en/aix/7.2?topic=management-data-compression-by-using-zlibnx-library

 

0 comments
33 views

Permalink