Chapter 10. SQL Remote Administration
Whatmessages are
appliedin parallel Whenworker threads are being used, messages from different remote users
areapplied in parallel. Messagesfrom a single remote user are applied
serially.For example, ten messages from a single remote user will be
appliedby a single worker thread in the correct order.
Deadlockis handled by re-applying the rolled back transaction at a later
time.
Readingmessages from the message system is single-threaded. Messages
areread and the header information is examined (to determine the remote
userand the correct order of application) before passing them off to worker
threadsto be applied.
Buildingmessages and sending messages is single-threaded.
OpenClient version Touse multiple worker threads with the Adaptive Server Enterprise Message
Agent,you need to be using Open Client version 11.1 or above.
TheMessage Agent prints a message and then does not use worker threads
whenpre-11.1 versions are being used. TheOpen Client version is displayed
inthe first few lines of the Message Agent output.
Tuningthroughput by caching messages
TheMessage Agent caches incoming messages in a configurable area of
memoryas it reads them.
Specifyingthe message
cachesize Thesize of the message cache is specified on the Message Agent command
line,using the -moption.
The-m option specifies the maximum amount of memory to be used by the
MessageAgent for building messages. Theallowed size can be specified as
n
(inbytes),
n
K,or
n
M.The default is 2048K (2M).
Example Thefollowing command line starts an Adaptive Server Anywhere Message
Agentusing twelve Megabytes of memory as a message cache:
dbremote -c "eng=..." -m 12M
Howmessages are
cached Whentransactions are large, or messages arrive out of order, they are stored
inmemory by the Message Agent until the message is to be applied. This
cachingof messages prevents rereading of out-of-order messages from the
messagesystem , which may lower performance on large installations. Itis
especiallyimportant when messages are being read over a WAN (such as
RemoteAccess Services or POP3 through a modem). Italso avoids
contentionbetween worker threads reading messages (a single threaded
task)because the message contents are cached.
Whenthe memory usage specified using the -m option is exceeded,
229