ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » General IBM MQ Support » Batch size

Post new topic  Reply to topic
 Batch size « View previous topic :: View next topic » 
Author Message
masteringmq
PostPosted: Thu Nov 13, 2008 5:51 am    Post subject: Batch size Reply with quote

Master

Joined: 20 Oct 2008
Posts: 200

I was going through websphere mq explorer and I came across a beautiful looking attribute and it's called batch size. This beautiful attribute by default has a value of 50. I can imagine that 50 messages must be sent to the destination queue before a commit can take place. Otherwise MQ will end the batch and this is done if the associated transmission queue is empty. How do I check the commit status?. I imagine using

dis qs(QM1.RQST) UNCOM

Please advice. I imagine harder and even with two messages in QM1.RQST my application can still grab the messages. Please advice.
Back to top
View user's profile Send private message
Vitor
PostPosted: Thu Nov 13, 2008 6:03 am    Post subject: Re: Batch size Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

masteringmq wrote:
I can imagine that 50 messages must be sent to the destination queue before a commit can take place. Otherwise MQ will end the batch and this is done if the associated transmission queue is empty.


You can imagine that but not quite what the documentation says. The batch size is the maximum number of messages that will be sent over the channel. Hence if 2 messages arrive the MCA won't wait for another 48 but will send the 2 in a single batch. If 52 turn up, 50 will go in one batch, 2 in another.

masteringmq wrote:
How do I check the commit status?. I imagine using

dis qs(QM1.RQST) UNCOM



That shows uncommitted messages on the target queue & has nothing with transmission.

masteringmq wrote:
I imagine harder and even with two messages in QM1.RQST my application can still grab the messages. Please advice.


It depends on what queue QM1.RQST is. If it's a transmission queue (as you seem to be discussing such queues) your application doesn't go anywhere near it.

Don't imagine. Read, take some training and experiment.

Then imagine.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
masteringmq
PostPosted: Thu Nov 13, 2008 6:41 am    Post subject: Reply with quote

Master

Joined: 20 Oct 2008
Posts: 200

I have been doing it all the while using batch size 50. So I had an imagination suppose thousands of messages are transmitted on the channel now how do I get the consumer to grab many messages as a single batch. Then if the message size is 4 MB per message. If the batch size is 100. 100 x 4 MB = 400 MB.

Quote:
MCA won't wait


But I can set the BATCHINT attribute to a couple of seconds. Please advice.


Last edited by masteringmq on Thu Nov 13, 2008 6:58 am; edited 1 time in total
Back to top
View user's profile Send private message
Vitor
PostPosted: Thu Nov 13, 2008 6:58 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

masteringmq wrote:
how do I get the consumer to grab many messages as a single batch.


You don't. The consumer grabs one message at a time from the target queue; the transmission of messages is nothing to do with the end application, as I indicated in my last post.

There has been much discussion of batch size & throughput on the forum and you'll find a search profitable. It's one of those questions where there is no "right" answer, no one-batch-size-fits-all setting.

There is a school of thought, which you'll find represented in postings here, which says you should segrigate large messages (and "large" is another disputed word") and smaller messages in the same way you might segrigate real time request/reply from non time-critical updates.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
PeterPotkay
PostPosted: Thu Nov 13, 2008 9:54 am    Post subject: Re: Batch size Reply with quote

Poobah

Joined: 15 May 2001
Posts: 7722

Vitor wrote:
masteringmq wrote:
I can imagine that 50 messages must be sent to the destination queue before a commit can take place. Otherwise MQ will end the batch and this is done if the associated transmission queue is empty.


You can imagine that but not quite what the documentation says. The batch size is the maximum number of messages that will be sent over the channel. Hence if 2 messages arrive the MCA won't wait for another 48 but will send the 2 in a single batch. If 52 turn up, 50 will go in one batch, 2 in another.

If 2 messages show up and the batch size is 50, the MCA will wait for however long BATCHINT is set to. If more than 50 show up than BATCHINT does not come into play. The channel moves the batches as fast as it can in that case.
_________________
Peter Potkay
Keep Calm and MQ On
Back to top
View user's profile Send private message
JosephGramig
PostPosted: Thu Nov 13, 2008 12:35 pm    Post subject: Reply with quote

Grand Master

Joined: 09 Feb 2006
Posts: 1244
Location: Gold Coast of Florida, USA

If BATCHINT is 0 (the default), whichever comes first:

  • XMITQ is empty
  • BATCHSIZE is reached
  • BATCHINT is reached


The channel sends the batch. If you size your max MSG size, BATCHSIZE and BATCHINT large enough, you can create a great pickle for yourself.

Word to the wise, don't mess with it.
Back to top
View user's profile Send private message AIM Address
bruce2359
PostPosted: Thu Nov 13, 2008 1:14 pm    Post subject: Reply with quote

Poobah

Joined: 05 Jan 2008
Posts: 9469
Location: US: west coast, almost. Otherwise, enroute.

Quote:
If you size your max MSG size, BATCHSIZE and BATCHINT large enough you can create a great pickle for yourself.

As with most settings, having some goal in mind helps.

Network throughput can be maximized when batches of messages are sent/received vs. many single messages. There is handshaking between channel ends pre- and post-batch.

This (BATCHSIZE) needs to be balanced off against how long to wait for the last message that will comprise the batch (BATCHINTERVAL). Should the sending MCA wait 1 second, 1 minute, ...? Or not wait at all.

Message size impacts network flow, but not something sysadmins can effectively manage with our channel settings. Programmers create messages of whatever size they desire.
_________________
I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » General IBM MQ Support » Batch size
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.