Configuring compression

If your distributed application sends or receives data that contains repeated zeros or spaces, turning on xfServerPlus compression will improve network throughput. Both sent and received data will be compressed.To use compression, both xfServerPlus and xfNetLink must be version 8.1.5 or higher.

Note

xfServerPlus compression does not compress the entire packet; it compresses only repeated zeros and spaces within the packet. (There must be at least three consecutive zeros or spaces for compression to take place.) Consequently, if your application passes only small amounts of data or passes large amounts of data that do not contain repeated zeros or spaces, compression will be of no benefit and may even degrade performance because the packets must be scanned. The improvement in network throughput for any particular application will depend on the average packet size and the amount of compressible data.

To turn on compression, set XFPL_COMPRESS in the xfpl.ini file to ON:

XFPL_COMPRESS=ON

You do not need to do anything on the client side to enable compression. If compression is turned on in the xfpl.ini file and the client does not support compression, compression will simply not take place (no error will occur).

You can verify that compression is being used by checking the xfServerPlus log. If XFPL_SESS_INFO is set to ALL and packets are being compressed, you’ll see “Compression = on” in the log. The average percentage of compression of all packets sent in each session will be logged as well, so that you may evaluate its benefit. (If you have debug logging turned on, the packets will be logged in their uncompressed form.)

To turn compression off, set XFPL_COMPRESS to OFF or remove the setting from the xfpl.ini file.