SQL Remote User's Guide
SQL Remote Administration
Tuning Message Agent performance
It is assumed in this section that you are tuning the performance of a Message Agent that is running in continuous mode at a consolidated site.
Worker threads can be used by the Message Agent to apply incoming messages from remote users. This can improve throughput by allowing messages to be applied in parallel rather than serially.
The number of worker threads is set on the Message Agent command line, using the -w
option. The following command line starts the Message Agent for Adaptive Server Enterprise with twenty worker threads applying messages:
ssremote -c "eng=..." -w 20
The default is to use no worker threads, so that all messages are applied serially. The maximum number of worker threads is 50.
For the Message Agent for Adaptive Server Anywhere, the performance advantage will be most significant when the server is on a system with a striped drive array.
For Adaptive Server Enterprise, the Message Agent will benefit even more if the Server is used with multiple engines configured.
When worker threads are being used, messages from different remote users are applied in parallel. Messages from a single remote user are applied serially. For example, ten messages from a single remote user will be applied by a single worker thread in the correct order.
Deadlock is handled by re-applying the rolled back transaction at a later time.
Reading messages from the message system is single-threaded. Messages are read and the header information is examined (to determine the remote user and the correct order of application) before passing them off to worker threads to be applied.
Building messages and sending messages is single-threaded.
To use multiple worker threads with the Adaptive Server Enterprise Message Agent, you need to be using Open Client version 11.1 or above.
The Message Agent prints a message and then does not use worker threads when pre-11.1 versions are being used. The Open Client version is displayed in the first few lines of the Message Agent output.