Tuning client and server connection channels

The default settings for client and server connection channels changed in IBM® WebSphere® MQ 7.0 to use shared conversations. Performance enhancements for distributed severs were then introduced in IBM MQ 8.0. To benefit from the new features that were introduced alongside shared conversations, without the performance impact on the distributed server, set SHARECNV to 1 on your IBM MQ 8.0 or later server connection channels.

From IBM WebSphere MQ 7.0, each channel is defined by default to run up to 10 client conversations per channel instance. Before IBM WebSphere MQ 7.0, each conversation was allocated to a different channel instance. The enhancements added in IBM WebSphere MQ 7.0 also include the following features:
  • Bi-directional heartbeats
  • Administrator stop-quiesce
  • Read-ahead
  • Asynchronous-consume by client applications

For some configurations, using shared conversations brings significant benefits. However, for distributed servers, processing messages on channels that use the default configuration of 10 shared conversations is on average 15% slower than on channels that do not use shared conversations. On an MQI channel instance that is sharing conversations, all of the conversations on a socket are received by the same thread. If the conversations sharing a socket are all busy, the conversational threads contend with one another to use the receiving thread. The contention causes delays, and in this situation using a smaller number of shared conversations is better.

You use the SHARECNV parameter to specify the maximum number of conversations to be shared over a particular TCP/IP client channel instance. For details of all possible values, and of the new features added in IBM WebSphere MQ 7.0, see MQI client: Default behavior of client-connection and server-connection. If you do not need shared conversations, there are two settings that give best performance in IBM MQ 8.0 or later:
  • SHARECNV(1). Use this setting whenever possible. It eliminates contention to use the receiving thread, and your client applications can take advantage of the new features added in IBM WebSphere MQ 7.0. For this setting, distributed server performance is significantly improved in IBM MQ 8.0 or later. The performance improvements apply to IBM MQ 8.0 or later client applications that issue non read ahead synchronous get wait calls; for example C client MQGET wait calls. When these client applications are connected, the distributed server uses less threads and less memory and the throughput is increased.
  • SHARECNV(0). The channel instance behaves exactly as if it was an IBM WebSphere MQ 6.0 server or client connection channel, and you do not get the extra features such as bi-directional heartbeats that are available when you set SHARECNV to 1 or greater. Use a value of 0 only if you have existing client applications that do not run correctly when you set SHARECNV to 1 or greater.
Note: If a server has clients connected to it that are sharing conversations over a socket, and you decrease the shared conversations setting from SHARECNV(10) to SHARECNV(1), this has the following effects:
  • Increased socket usage on the server.
  • Increased channel instances on the server.
In this case, you might also choose to increase the settings for MaxChannels and MaxActiveChannels.

For consistency with previous releases the default SVRCONN channel has not been updated, so you need explicitly to set SHARECNV to 1 or 0.