giovedì 21 aprile 2011

Optimizing Performance of the MSMQ Adapter

Receive Optimization
On the receive side, you can have the adapter use a single execution thread. Whether the adapter uses a single thread or multiple threads depends on the setting of the Ordered Processing property on the receive location, as follows:
  • When the property is True, the adapter operates on a single thread. This limits the adapter to one message at a time and conserves memory. Notice that this effectively sets Batch Size to one (1), regardless of the value assigned to it in the property sheet.

  • When Ordered Processing is False, the adapter runs multiple threads and can process multiple messages at a time, therefore increasing performance.

You must set Ordered Processing to True if you put a premium on managing server resources, or if the number or size of messages might exhaust available memory.
You can also control memory use by reducing the value of Batch Size on the receive location. A smaller batch size keeps fewer messages in memory and therefore uses less memory.
(from MSDN).
Placing send ports and receive locations on separate computers can also reduce memory use.

Nessun commento: