Network Deployment (Distributed operating systems), v8.0 > Tune performance > Tune Service integration
Configure MDB throttling for the default messaging provider
Use this task to configure the throttling of messages for message-driven beans that we have deployed as JCA 1.5 resources on the default messaging provider.
The throttling support described in this topic only applies to the default messaging provider (the service integration JMS Resource Adapter).
For the WebSphere MQ messaging provider, you configure message throttling by setting the maximum server sessions property on the WebSphere MQ messaging provider activation specifications panel, or the maxPoolSize property when using the createWMQActivationSpec or modifyWMQActivationSpec wsadmin commands.
If we have a third-party JCA 1.5-compliant JMS messaging provider, refer to the generic method of message throttling described in Throttling inbound message flow for JCA 1.5 message-driven beans.
Use this task to throttle messages for a message-driven bean deployed as a J2EE Connector Architecture (JCA) 1.5 resource on the default messaging JMS provider.
The default messaging provider (the service integration JMS Resource Adapter) uses a special type of message throttling. We can leave the message-driven bean pools to the default size of 500.
The default messaging provider enables the throttling of message delivery to a message-driven bean through the Maximum concurrent endpoints configuration option on the JMS activation specification used to deploy the bean.
- The maximum number of instances of each message-driven bean is controlled by the Maximum concurrent endpoint setting in the activation specification used to deploy the message-driven bean. This maximum concurrency limit helps prevent a temporary build up of messages from starting too many MDB instances. By default, the maximum number of concurrent MDB instances is set to 10.
The Maximum concurrent endpoints field limits the number of endpoints (instances of a given message-driven bean) that process messages concurrently. If the maximum has been reached, new messages are not accepted from the messaging engine for delivery until an endpoint finishes its current processing.
If the available message count (queue depth) associated with a message-driven bean is frequently high, and if your server can handle more concurrent work, you can benefit from increasing the maximum concurrency setting.
If you set the maximum concurrency for a message-driven bean, be sure that you specify a value smaller than the maximum number of endpoint instances that can be created by the adapter that the message-driven bean is bound to. If necessary, increase the endpoint instance limit.
- An activation specification also has a Maximum batch size that refers to how many messages can be allocated to an endpoint in one batch for serial delivery. So, for example, if we have set the Maximum concurrent endpoints property to 10 and the Maximum batch Size property to 3, then there can be up to 10 endpoints each processing up to 3 messages giving a total of 30 messages allocated to that message-driven bean. If there are multiple message-driven beans deployed against a single activation specification then these maximum values apply to each message-driven bean individually.
- Take care to ensure that you always set the Maximum concurrent endpoints property is always less than the JCA pool size.
You might want to tune the throttling of your message-driven beans, which is especially important on z/OS. Workload arriving on the destination the message-driven bean is consuming from might use up more server resource and therefore obstruct other activities. An example of this is when restarting MDB applications you find a backlog of messages. The number of messages can be throttled so that the message-driven bean can process them in the most efficient manner.
To configure the message throttling support of the default messaging provider (the service integration bus JMS Resource Adapter), use the admin console to complete the following steps.
Procedure
- Tune the maximum number of instances of a message-driven bean.
The maximum concurrency is set in the activation specification used to deploy the message-driven bean.
- Click Resources -> Resource Adapters -> J2C activation specifications -> activation_specification_name -> [Additional Properties] J2C activation specification custom properties .
- View the maxConcurrency custom property. The default is value is 10. For high throughput primitive MDB tests, 40 was found to be an optimal value.
- Optional: To change the maxConcurrency setting, click the value field. This displays a panel for you to type a new value. In the Value field, type the new value then click OK. Save your changes to the master configuration.
- Tune the maximum batch size for a message-driven bean.
By default, only a single message is delivered to a message-driven bean instance at one time. We can improve performance by batching messages to the message-driven bean. Each message-driven bean instance then receives a number (between 1 and the batch size) of messages at a time. A change in the maximum concurrency is likely to be beneficial if the available message count (queue depth) associated with the message-driven bean is frequently high. For more information about the available message count, see View the Available Message Count on a destination. The maximum batch size is set in the activation specification used to deploy the message-driven bean.
- Click Resources -> Resource Adapters -> J2C activation specifications -> activation_specification_name -> [Additional Properties] J2C activation specification custom properties .
- View the maxBatchSize custom property. The default value is 1. For high throughput primitive MDB tests, 5 was found to be optimal value (providing a 20 per cent gain over batch size 1).
- Optional: To change the maxBatchSize setting, click the value field. This displays a panel for you to type a new value. In the Value field, type the new value then click OK. Save your changes to the master configuration.
Workload sharing with queue destinations
Tune messaging performance with service integration technologies
JMS activation specification [Settings]