Sybase SQL Remote DC38133-01-0902-01 User Manual

Page of 485
Chapter 10. SQL Remote Administration
What messages are
applied in parallel
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.
Open Client version
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.
Tuning throughput by caching messages
The Message Agent caches incoming messages in a configurable area of
memory as it reads them.
Specifying the message
cache size
The size of the message cache is specified on the Message Agent command
line, using the
-m
option.
The
-m
option specifies the maximum amount of memory to be used by the
Message Agent for building messages. The allowed size can be specified as
n (in bytes), nK, or nM. The default is 2048K (2M).
Example
The following command line starts an Adaptive Server Anywhere Message
Agent using twelve Megabytes of memory as a message cache:
dbremote -c "eng=..." -m 12M
How messages are
cached
When transactions are large, or messages arrive out of order, they are stored
in memory by the Message Agent until the message is to be applied. This
caching of messages prevents rereading of out-of-order messages from the
message system , which may lower performance on large installations. It is
especially important when messages are being read over a WAN (such as
Remote Access Services or POP3 through a modem). It also avoids
contention between worker threads reading messages (a single threaded
task) because the message contents are cached.
When the memory usage specified using the
-m
option is exceeded,
229