Java CAPS JMS Reference

Performance Issues

The large assortment of configuration parameters permits a high degree of control over processing speed, memory use, and disk space. The JMS IQ Manager properties work together to enable you to fine-tune your system according to load and hardware constraints. For information, refer to Segment Properties.

Because every message is written to disk, file input/output (I/O) is usually the hardware factor with the largest performance impact. For a disk with adequate I/O speed, highest performance is achieved by holding all messages in server memory continuously until the corresponding segment is cleaned up.

Available server memory can easily be exceeded for systems handling very large messages, so several configuration parameters are provided to help you manage a memory-bound server. See Throttling Producers for additional information.

To maximize performance:

Throttling Producers

In addition to disk and memory-management features provided by the operating system, special configuration properties within the JMS IQ Manager specifically deal with messages, message destinations, and producers.

When the amount of JMS IQ Manager memory allocated to messages reaches a certain limit, you can instruct the JMS IQ Manager to stop reading all messages from one or more producers until certain criteria are met. This process is referred to as throttling the producer.

Producer throttling is done on a per-message destination basis. This process addresses the two most common reasons for approaching the JMS IQ Manager memory limit in an otherwise well-tuned system:

Three configuration properties govern producer throttling:

Once throttling has been initiated, the JMS IQ Manager resumes reading messages for the affected message destinations only when one of the following criteria is met:

Example of Producer Throttling and Unthrottling

The following table illustrates a scenario where a JMS IQ Manager exceeds its specified threshold and begins to throttle selected producers. In this example, the JMS IQ Manager uses the following (default) values for throttling properties:

Two minutes after the server exceeds its limit, Topic_A, which has two subscribers and one publisher, is affected. Its publisher is throttled until the number of undelivered messages can drop below 900. Later, because the JMS IQ Manager is no longer loaded, the same topic builds up an even greater backlog without having its publisher throttled.

Table 1–6 Publisher Throttling Example

Time 

Total Messages on All Topics (Server) 

The Highest Sequence Number (Messages in Topic_A only) 

Comment 

Read from Pub1: 

Sent to Sub1: 

Sent to Sub2: 

11:37 

98604 

500 

200 

75 

Server is not yet over limit. 

11:38 

100307 

800 

500 

150 

Server is now over limit, but Topic_A is unaffected because its subscribers are keeping up well enough. 

11:39 

101283 

1100 

800 

225 

Server is still over limit, Topic_A is still unaffected because only 875 messages are undelivered. 

11:40 

103429 

1350 

1050 

300 

Now that it has 1050 undelivered messages, Topic_A has crossed the per-destination limit. While the server remains over limit, Pub1 will remain throttled until the number of undelivered messages falls below 900, which is the difference between the value specified by the Per-Destination Throttling Threshold and the value specified by the Throttling Lag).

11:41 

104031 

1350 

1300 

375 

Pub1 is throttled, Sub1 is nearly caught up, Sub2 is catching up but still has 975 undelivered messages. 

11:42 

103204 

1350 

1350 

449 

Pub1 is throttled, Sub1 has caught up, Sub2 has 901 undelivered messages, which is still too many. 

11:43 

102762 

1350 

1350 

451 

Although the server is still over limit, it unthrottles Pub1 because the undelivered message count for Topic_A has fallen below 900. 

11:44 

101095 

1375 

1370 

525 

Server is over limit, but Topic_A is unaffected because it has only 850 undelivered messages. 

11:45 

100028 

1575 

1500 

600 

Server is over limit, but Topic_A is unaffected because it has only 975 undelivered messages. 

11:46 

99248 

1900 

1700 

675 

Server is no longer over limit. No publishers are throttled even though Sub2 has more than 1000 undelivered messages.