One BIG message or many Small messages

Discussions

Performance and scalability: One BIG message or many Small messages

  1. One BIG message or many Small messages (2 messages)

    My application sends XML messages to a queue in MQ server. Now I have lot of information in one message. I want to know will it be better to cut the big message down into small messages or send all the information in one big message only.
    thanks in advance.
  2. My application sends XML messages to a queue in MQ server. Now I have lot of information in one message. I want to know will it be better to cut the big message down into small messages or send all the information in one big message only. thanks in advance.
    As a general performance principle: Big is better!
    With a Big message, you'll only incur overhead once, with many small ones you'll incur overhead for every single one.
    The less chatter you create going from one station to another, the better it is.

    Roland Stens
    http://www.performancetester.com
  3. As a general performance principle: Big is better!With a Big message, you'll only incur overhead once, with many small ones you'll incur overhead for every single one.
    Well, in the case of XML the best approach (IMHO) is 'divide and conquer'. When you use XML messages of less than 4 kbytes., the parsing task is done very quickly. But, when you start using big XML messages (for example bigger than 200 kbytes.) the process of parsing the message uses a lot of CPU and memory, and the throughput starts to go down. Of course, if you are going to use XSLT, the size of the XML also DO matters.

    Jose R. Huerga
    http://www.terra.es/personal/jrhuerga