WAS v8.5 > Tune performance > Tune Messaging resources > Tune messagingTune messaging performance for the default messaging provider
To help optimize performance, we can set tuning properties that control the performance of message-driven beans and other messaging applications. To optimize the performance of messaging with the default messaging provider, we can use the dmgr console to set various parameters as described in the steps below. We can also set these parameters using wsadmin.
- Monitor MDB thread pool size for the default messaging provider.
You might experience a performance bottleneck if there are insufficient threads available for the message-driven beans. There is a trade-off between providing sufficient threads to maximize the throughput of messages and configuring too many threads, which can lead to CPU starvation of the threads in the application server. If you notice the throughput for express nonpersistent, reliable nonpersistent, or reliable persistent messaging has fallen as a result of increasing the size of the default thread pool, then decrease the size of the thread pool and reassess the message throughput.
- View or change the number of threads in the default thread pool for an application server. By default, message-driven beans use the default thread pool.
- Click Servers -> Server Types -> WebSphere application servers -> server_name -> [Additional Properties] Thread Pools > Default. By default the Minimum size value is set to 5 and the Maximum size value is set to 20. The best performance is obtained by setting the Maximum size value to the expected maximum concurrency for all message-driven beans. For high throughput using a single message bean, 41 was found to be the optimal Maximum size value.
- Change the Maximum size value, then click OK.
- Optional: Create our own thread pool. The default thread pool is also used by other WebSphere Application Server components, so you might want to define a separate thread pool for the message-driven beans. This reduces thread contention for the default thread pool.
- Click Servers -> Server Types -> WebSphere application servers -> server_name -> [Additional Properties] Thread Pools.
- Create a new thread pool.
- Create sufficient threads to support the maximum amount of concurrent work for the message-driven beans.
- Change the SIB JMS Resource Adapter to use the new thread pool:
- Click Resources -> Resource Adapters -> Resource adapters.
- If we cannot see any SIB JMS Resource Adapter instances in the list, expand Preferences and enable Show built-in resources.
- Select the SIB JMS Resource Adapter with the appropriate scope depending upon the scope of the connection factories.
- Add the name of the new thread pool in the Thread pool alias box.
- Click Apply .
- Save your changes to the master configuration.
- Tune MDB performance with the default messaging provider.
- Click Resources -> JMS -> Activation specifications -> activation_specification_name.
- Set the maximum batch size for this activation specification.
Delivering batches of messages to each MDB endpoint can improve performance, particularly when used with Acknowledge mode set to Duplicates-ok auto-acknowledge. However, if message ordering must be retained across failed deliveries, set this parameter to 1.
- Set the maximum number of concurrent endpoints for this activation specification.
Maximum concurrent endpoints parameter controls the amount of concurrent work that can be processed by a message bean. The parameter is used with message-driven beans. Increasing the number of concurrent endpoints can improve performance but can increase the number of threads in use at one time. To benefit from a change in this parameter, there should be sufficient threads available in the MDB thread pool to support the concurrent work. However, if message ordering must be retained across failed deliveries, set this parameter to 1.
- Save your changes to the master configuration.
For additional information about tuning the throttling of message-driven beans, including controlling the maximum number of instances of each message bean and the message batch size for serial delivery, see Configure MDB or SCA throttling for the default messaging provider.
- Change the maximum connections in a connection factory for the default messaging provider.
Maximum connections parameter limits the number of local connections. The default is 10. This parameter should be set to a number equal to or greater than the number of threads (enterprise beans) concurrently sending messages.
- Click Resources -> JMS -> Topic connection factories -> factory_name > [Additional Properties] Connection pool properties.
- Enter the required value in the Maximum connections field.
- Click Apply.
- Save your changes to the master configuration.
Related
Configure MDB or SCA throttling for the default messaging provider
Tune messaging performance with service integration