Note that there are some explanatory texts on larger screens.

plurals
  1. PODrastic decrease in MSMQ performance when alternating between a transactional and non-transactional queue?
    primarykey
    data
    text
    <p>I've been running some tests to check the performance of MSMQ and test whether it will suit our needs in terms of passing off high volumes of messages to a separate service to handle. Our requirement is that some messages are important and must be delivered in a recoverable manner using transactions, and others not.</p> <p>My experiment consisted of sending 1000 strings of text 108 bytes long to MSMQ, and doing this 50 times, to get an average and registering the minimum, maximum, and average performance of each batch of 1000 messages.</p> <p>I am using a C++ service to dispatch the messages to two local private queues, one non-transactional, and one transactional where necessary. I ran four experiments, these are:</p> <p>1) Only transactional sends</p> <p>2) Only non-transactional sends</p> <p>3) Sending 500 of each set of 1000 messages non-transactionally, followed by the other 500 transactionally</p> <p>4) Sending 500 messages transactionally, and 500 non-transactionally, alternating between transactional and non-transactional so that each transactional is followed by a nontransactional and so on</p> <p>I've eliminated any other outside factors, and the results I get are rather strange, hence why I'm wondering if anyone can explain? The results are as follows:</p> <p>1) Transactional</p> <pre><code>Average: 1436 Min: 398 Max: 1902 </code></pre> <p>2) Non-transactional</p> <pre><code>Average: 35 Min: 30 Max: 100 </code></pre> <p>3) Mixed follow on</p> <pre><code>Average: 40 Min: 29 Max: 323 </code></pre> <p>4) Mixed interspersed</p> <pre><code>Average: 4944 Min: 1214 Max: 5941 </code></pre> <p>The two issues that confuse me are that firstly alternating between a transactional send and a non-transactional send causes a roughly 5 fold performance hit over sending everything transactionally - I'd have thought sending everything transactionally would be more expensive than only sending half the messages transactionally regardless of the way this is done, not 5 times slower. Secondly, that sending 500 transactional messages after 500 non-transactional messages seems to actually speed up the transactional sends compared to when they are sent as a single batch of 1000 separate transactions judging by the average send rate only being 40ms for this test.</p> <p>Is the alternation between writing individual messages to a transactional followed by a non-transactional queue repeatedly caused by MSMQ having to switch between files it serialises to in a synchronous manner or some such?</p> <p>For reference, I'm using single message transactions built into MSMQ. I also ran these experiments a few times and the figures were always largely similar. I have also verified the data is calculated correctly.</p> <p>Any help in explaining the performance hit of switching queue, and the performance gain of sending to a non-transactional queue before a transactional queue would be much appreciated.</p> <p>Thanks in advance.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload