Chapter 10. SQL Remote Administration

What messages are When worker threads are being used, messages from different remote users

applied in parallel 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

The size of the message cache is specified on the Message Agent command

cache size

line, using the -moption.

 

The -moption 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

When transactions are large, or messages arrive out of order, they are stored

cached

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 -moption is exceeded,

229

Page 247
Image 247
Sybase DC38133-01-0902-01 manual Tuning throughput by caching messages