Communication compression settings

Enabling compression for one or all connections, and setting the minimum size at which packets are compressed, can improve SQL Anywhere performance in some circumstances. Therefore, you should perform a performance analysis on your network with your applications to determine whether changing the compression threshold is beneficial.

Enabling compression increases the quantity of information stored in data packets, thereby reducing the number of packets required to transmit a particular set of data. By reducing the number of packets, the data can be transmitted more quickly.

To determine if enabling compression will help in your particular situation, conduct a performance analysis on your network using your applications before using communication compression in a production environment.

You can tune compression performance by:

  • Enabling compression   Enabling compression for a connection (or all connections) can significantly improve SQL Anywhere performance under some circumstances, including:

    • When used over slow networks such as some wireless networks, some modems, serial links, and some WANs.

    • When used in conjunction with SQL Anywhere encryption over a slow network with built-in compression since packets are compressed before they are encrypted.

    Enabling compression, however, can sometimes also cause slower performance. For example:

    • Communication compression uses more memory and more CPU. It may cause slower performance, especially for LANs and other fast networks.

    • Most modems and some slow networks already have built-in compression. In these cases, SQL Anywhere communication compression will not likely provide additional performance benefits unless you are also encrypting the data.

    To enable or disable compression, see Compress (COMP) connection parameter and -pc dbsrv12 server option.

  • Modifying the compression threshold  

    Note

    For most networks, the compression threshold does not need to be changed. In rare circumstances, you might adjust the compression threshold to improve SQL Anywhere performance.

    To determine if modifying the compression threshold will help in your particular situation, conduct a performance analysis on your network using your applications before making any adjustments in a production environment.

    When compression is enabled, individual packets may or may not be compressed, depending on their size. SQL Anywhere does not compress packets smaller than the compression threshold, even if communication compression is enabled.

    Because CPU time is required to compress packets, attempting to compress small packets can actually decrease performance.

    In general, lowering the compression threshold value may improve performance on very slow networks, while raising the compression threshold may improve performance by reducing CPU usage. However, since lowering the compression threshold value increases CPU usage on both the client and server, a performance analysis should be done to determine whether changing the compression threshold is beneficial.

     Adjust SQL Anywhere compression settings
    1. Enable communication compression.

      Large data transfers with highly compressible data and larger packet sizes tend to get the best compression rates. See Compress (COMP) connection parameter and -pc dbsrv12 server option.

    2. Adjust the CompressionThreshold setting.

      Lowering the compression threshold value may improve performance on very slow networks, while raising the compression threshold may improve performance by reducing CPU usage.

      For more information about adjusting the CompressionThreshold (COMPTH) connection parameter, see CompressionThreshold (COMPTH) connection parameter and -pt dbsrv12 server option.

 See also