+

Search Tips   |   Advanced Search

Tune large objects in WebSphere Enterprise Service Bus


Overview

IBM recommends using 64-bit JVMs to service large objects.

The size of the business object in memory can be larger than the wire representation due to...

  • character encoding differences
  • modifications made as the message flows through the system
  • copies held during transactions for error handling and roll-back

To improve response time, limit the number of messages being concurrently processed...

  1. Restrict the number of clients
  2. Restrict the number of concurrent threads by tuning thread pools.

Networks are limiting factor when processing large objects. For example, maximum throughput of 50MB messages, in a single client thread, over a 10Gbit LAN, is...

    Bandwidth (10000Mbits) 
    ----------------------  * NIC transfer rate (.7)  =  140 Messages per Second
    Message Size (50Mbits) 

The NIC transfer rate is a limiting factor on the application layer due to overhead in lower layers, especially TCP/IP.

To reduce garbage collection and message processing overhead, IBM recommends using a separate JVM (dedicated appserver) for processing large messages This also allows independent tuning of the separate JVMs.


JVM tuning

For middleware solutions that create many short-lived objects, use Generational GC, which splits the JVM heap into three sections...

  • Allocate Space
  • Survivor Space
  • Tenured Space

Increasing the size of the heap results in more allocated objects before a GC is triggered, but has the side-effect of increasing the interval times between GCs, thus increasing the time it takes to process an allocation failure.

To conserve heap...

  • Limit the number of Web Container Threads to reduce the concurrent message processing.

  • Deploy a front-end server, such as a DataPower appliance, to throttle incoming client requests going to the WebSphere ESB.


MDB ActivationSpec tuning

To tune MDB Activation Specifications, go to...

Resources | Resource Adapters | J2C Activation Specifications | ActivationSpec Name

...or...

Resources | JMS | Activation Specifications | ActivationSpec Name

...and set values for...

maxConcurrency Number of messages that can be concurrently delivered from the JMS queue to the MDB threads.
maxBatchSize How many messages are taken from the messaging layer and delivered to the application layer in a single step.


Thread pool tuning

To tune thread pools, go to...

Servers > Application Servers > Server Name > Thread Pools > Thread Pool Name

...and set...

Default
ORB.thread.pool
WebContainer


Queue connection factory tuning

To tune Connection factories or Queue connection factories, go to...

  • Resources | Resource Adapters | J2C Connection Factories | Factory Name | Additional Properties | Connection Pool Properties
  • Resources | JMS | Connection Factories | Factory Name | Additional Properties | Connection Pool Properties
  • Resources | JMS | Queue Connection Factories | Factory Name | Additional Properties | Connection Pool Properties

...and set Maximum connections.


Decomposing inputs

If the large message is primarily a collection of smaller business objects, and if there are no temporal dependencies or an "all or nothing" requirement, we can group the objects into conglomerate objects less than 1MB in size.


Claim check pattern

We can reduce the size of the business object in memory if only few attributes are required by the mediation.

  1. Detach the data payload from the message
  2. Extract the required attributes into a smaller 'control' BO
  3. Persist the larger data payload to a data store and store the 'claim check' as a reference in the 'control' BO
  4. Process the smaller 'control' BO, which has a smaller memory footprint
  5. When we need the whole large payload again, check out the large payload from the data store using the 'claim check' key
  6. Delete the large payload from the data store
  7. Merge the attributes in the 'control' BO with the large payload, taking the changed attributes in the 'control' BO into account

 

See

Integrate WebSphere DataPower XC10 and XI50 Appliances