Tuning messaging performance for the Eclipse Amlen resource adapter in WebSphere Application Server

To help optimize messaging performance, you can tune the Eclipse Amlen resource adapter properties that control the performance of message-driven beans and other messaging applications.

You can optimize the performance of messaging by tuning specific Eclipse Amlen resource adapter parameters. You can set these parameters by using the WebSphere® Application Server administrative console or by using the wsadmin tool.

For information about tuning the performance of WebSphere Application Server, see the tuning sections in WebSphere Application Server V8.5 Administration and Configuration Guide for the Full Profile.

Complete the following steps to optimize the messaging performance for the Eclipse Amlen resource adapter in WebSphere Application Server by using the WebSphere Application Server administrative console:

  1. Monitor MDB thread pool size for the Eclipse Amlen resource adapter.

    If an insufficient number of threads are available for your message-driven beans, a performance bottleneck can be created. There is a compromise between providing enough threads to maximize the throughput of messages and configuring too many threads. Configuring too many threads can lead to CPU starvation of the threads in the application server. If you notice that the throughput of messages falls after you increase the size of the default thread pool, then decrease the size of the thread pool and reassess the message throughput.

    1. View or modify the number of threads in your default thread pool for a WebSphere Application Server.

      By default, message-driven beans use the default thread pool. The best performance is obtained by setting the Maximum size value to the expected maximum concurrency for all message-driven beans. 

      1. Click Servers > Server Types > WebSphere application servers > server_name > [Additional Properties] Thread Pools > Default.
      2. Optional. Change the Maximum size value, then click OK.

    2. Optional. Create your own thread pool. 

      The default thread pool is used by a number of  WebSphere Application Server components, so you might want to define a separate thread pool for the message-driven beans. Creating your own thread pool reduces contention for the default thread pool.

      1. Click Servers > Server Types > WebSphere application servers > server_name > [Additional Properties] Thread Pools.
      2. Create a thread pool.
      3. Create enough threads to support the maximum amount of concurrent work for your message-driven beans.
      4. Change the Eclipse Amlen resource adapter to use your new thread pool by completing the following steps:
        1. Click Resources > Resource Adapters > Resource adapters.
        2. Select the Eclipse Amlen resource adapter with the appropriate scope. The scope of your resource adapter depends upon the scope of your connection factories.
        3. Replace the name in the Thread pool alias box with your new thread pool name.
        4. Click Apply.
    3. Save your changes to the master configuration.
  2. Tune MDB performance with the Eclipse Amlen resource adapter.
    1. Click Resources > Resource Adapters > Resource adapters > J2C activation specifications > activation_specification_name > J2C activation specification custom properties.
    2. Change the clientMessageCache setting for the activation specification.

      The default value of -1 sets the message cache size to 1000 for unshared topic subscriptions and to 0 for all other cases. Delivering a larger number of messages to each MDB endpoint can improve performance. However, in the cases of queues with multiple consumers, and shared topic subscriptions, keep the default value of -1 if messages must be distributed evenly across consumers.

    3. Change the concurrentConsumers setting for the activation specification.

      The concurrentConsumers property controls the amount of concurrent work that can be processed by a message bean. Increasing the number of concurrent consumers can improve performance but can also increase the number of threads that are in use at one time. To benefit from increasing the value of this property, you must have enough threads available in the MDB thread pool to support the concurrent work. However, if message order must be retained across failed deliveries, keep the default value of 1.

    4. Save your changes to the master configuration.
  3. Change the maximum connections in a connection factory for the Eclipse Amlen resource adapter.

    The maximum connections parameter limits the number of local connections. The default is 10. You might need to set this parameter to be as large as the number of threads (enterprise beans) that are concurrently sending messages.

    1. Click Resources > Resource Adapters > Resource adapters > J2C connection factories > factory_name > Connection pool properties.
    2. Enter the required value in the Maximum connections field.
    3. Click Apply.
    4. Save your changes to the master configuration.