The default setting for SHARECNV is 10
, which
allows up to 10 client conversations for each channel instance. However, using a different number of
shared conversations can be better for performance. If you do not need shared conversations, or are
using a distributed server, set SHARECNV to 1
. If you have
existing client applications that do not run correctly when you set SHARECNV to
1
or greater, set SHARECNV to 0
.
About this task
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, see
Supported IBM® MQ client: Default behavior of client-connection and
server-connection channels.
If you set
SHARECNV to
1
or greater, you enable the following performance enhancements:
- Bi-directional heartbeats
- Administrator stop-quiesce
- Read-ahead
- Asynchronous-consume by client applications
If you do not need shared conversations, these two settings give best performance:
-
SHARECNV(1)
.
-
SHARECNV(0)
.
Notes:
- If the client-connection SHARECNV value does not match the
server-connection SHARECNV value, then the lowest value is used.
- When applications are linked or compiled against a
non-reentrant library, the CURSHCNV(0) value is negotiated even if a higher value is set in CLNTCONN and SVRCONN.
To optimize performance for a given channel instance, complete any of the following
steps.
Procedure
- Monitor channels that use the default
SHARECNV
value of
10
.
The default setting of SHARECNV(10)
works well in many scenarios, but might not
be the optimum setting for a given channel instance. For example, for distributed servers,
processing messages on channels that use this setting is on average 15% slower than on channels that
do not use shared conversations.
To ensure that the default setting is appropriate for a given channel instance, monitor how the
channel performs with this setting.
- Set a
SHARECNV
value of 2
or more.
You can set SHARECNV(2)
to SHARECNV(999999999)
. To ensure that
the setting you choose is appropriate for a given channel instance, monitor how the channel performs
with the new setting.
- Set a
SHARECNV
value of 1
.
If you do not need shared conversations, use this setting whenever possible. It eliminates
contention to use the receiving thread, and your client applications can take advantage of the
performance enhancements described in the "about this task" section.
With this setting, distributed server performance is significantly improved. The performance
improvements apply to 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.
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.
Note: You can also set the MQCONNX option, MQCNO_NO_CONV_SHARING
and connect the application to a channel with SHARECNV set to a value greater
than 1
. The result is the same as connecting the application to a channel with
SHARECNV set to 1
.
- Set a
SHARECNV
value of 0.
The channel instance behaves exactly as if it was an IBM WebSphere® MQ 6.0 server or client connection channel. You do not get
shared conversations, or the performance enhancements 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.