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 » IBM MQ Java / JMS » Does explicit segmentation increase throughput?

Post new topic  Reply to topic
 Does explicit segmentation increase throughput? « View previous topic :: View next topic » 
Author Message
stenix
PostPosted: Thu Dec 09, 2010 6:37 am    Post subject: Does explicit segmentation increase throughput? Reply with quote

Novice

Joined: 08 Dec 2010
Posts: 12

Hi,

This concerns the standard java api to Websphere MQ.

In the api it is possible to do message segmentation explicitly as a complement of trusting this to the queue manager. We are facing quite heavy loads of large binary messages so my question is if it increases throughput if I do the segmentation explicitly in the code instead of letting the queue manager do this?

My thought was if the message is sent in smaller chunks, it may start sooner to transmit the message so that it does not have to wait until the last piece of data is written to the message. I guess this drills down to if the api starts to send the data upon the first call to message.write() or if it waits until the destination.put() call?

Best regards
stenix
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Fri Dec 10, 2010 7:37 am    Post subject: Re: Does explicit segmentation increase throughput? Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

stenix wrote:
Hi,

This concerns the standard java api to Websphere MQ.

In the api it is possible to do message segmentation explicitly as a complement of trusting this to the queue manager. We are facing quite heavy loads of large binary messages so my question is if it increases throughput if I do the segmentation explicitly in the code instead of letting the queue manager do this?

My thought was if the message is sent in smaller chunks, it may start sooner to transmit the message so that it does not have to wait until the last piece of data is written to the message. I guess this drills down to if the api starts to send the data upon the first call to message.write() or if it waits until the destination.put() call?

Best regards
stenix

The message is sent on the destination.put call if not under syncpoint. If under syncpoint it is sent once the commit call has been issued on the message (after the put of course).

Segmenting the message will slow the throughput if your network is fast and stable. However it will also slow down the other smaller messages.

This is why I recommend creating a specific channel to use for big messages only, leaving your smaller message traffic unaffected.

If you suffer from network problems, and possibly small log files etc... segmenting will help. The redo unit in the channel will be smaller, the commit unit on the channel will be smaller (using less log space) etc ...

I believe you will have to experiment and keep it sensible and down to earth.

Have fun
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
mqjeff
PostPosted: Fri Dec 10, 2010 7:43 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

The other question is, where do you start measuring throughput?

From the point at which the first segment of the message is put to the queue? From the point at which the last segment of the message is put to the queue? From the point at which the first message is read off the transmit queue? From the point at which the sending application receives an RC 0 for it's commit?
Back to top
View user's profile Send private message
stenix
PostPosted: Fri Dec 10, 2010 7:56 am    Post subject: Reply with quote

Novice

Joined: 08 Dec 2010
Posts: 12

I would say that throughput is the number of large messages that can be processed in a defined period of time regardless of when I start. Hmm, I guess I put the question wrong since I can see now that throughput is not increased by slicing messages. On the other hand it might affect the latency.

But if you say that the message is not written to the queue until the syncpoint is committed then it does not matter anyhow.

I will let the queue manager handle the segmentation until someone complains, then I may investigate for improvements.

Thank you for your answers.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Fri Dec 10, 2010 8:26 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

The message is *written* to the queue before syncpoint is complete, it's just not *available*.
Back to top
View user's profile Send private message
stenix
PostPosted: Mon Dec 13, 2010 12:15 am    Post subject: Reply with quote

Novice

Joined: 08 Dec 2010
Posts: 12

Quote:

The message is *written* to the queue before syncpoint is complete, it's just not *available*.


So when is the data actually written to the queue? Is it on the message.put() or on the message.write()?

If the message is of several GB of data, this can make quite a large difference, especially if the client is not on the same host as the queue.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Mon Dec 13, 2010 2:45 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

stenix wrote:
Quote:

The message is *written* to the queue before syncpoint is complete, it's just not *available*.


So when is the data actually written to the queue? Is it on the message.put() or on the message.write()?

The put.

The message.write is just adding data to the local buffer. the put sends the buffer to the queue manager, which stores the data in the q file but marked as unavailable if in syncpoint.

How and where the buffer is segmented when you are using a client connection and automatic segmentation, I don't know (and it may not be documented). But it presumably has to happen before data is written to the queue.
Back to top
View user's profile Send private message
stenix
PostPosted: Mon Dec 13, 2010 4:40 am    Post subject: Reply with quote

Novice

Joined: 08 Dec 2010
Posts: 12

Thank you for your answers.
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 » IBM MQ Java / JMS » Does explicit segmentation increase throughput?
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.