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 » Latency of technical acknowledgement during

Post new topic  Reply to topic
 Latency of technical acknowledgement during « View previous topic :: View next topic » 
Author Message
xiangh
PostPosted: Thu Aug 26, 2010 2:57 am    Post subject: Latency of technical acknowledgement during Reply with quote

Newbie

Joined: 24 Aug 2010
Posts: 2

Hi,

We are currently facing an almost blocking latency issue during calls to MQQueue.put() (we are using 6.0) and could benefit from some advices.

Basically, situation is the following :
  • Any MQQueue.put() call takes about 10ms (our expectations are in the ~1ms range)
  • Low level tracing shows that almost all this time is spent inside MQSESSIONClient.lowLevelComms() during the call to receive() immediately following the actual send() [from what Isee, this is some kind of technical ack)
  • If we use multiple queues (mutithreading the input), as a workaround, latency is still 10ms (for each queue, though at some point it seems one of the queue went wild, but I do not have those logs).
  • we ruled out a consumer issue by testing with a dummy application (just in case, as MQ is supposed to isolate our application from such potential issues)


Our basic hypothesis are the followings :
  • It could be a server setting, however no explicit throttling setting apparently exists.
  • It could be a network issue (we're currently requesting ITs on both sides to perform trame capture so that we can check the figures on each side, delta between sent message and technical ack in particular)
  • could be a TCP_NODELAY related issue, however I do not know how to check/ensure that TCP_NODELAY is set for the MQ connection (and ITs might be reluctant to set it at global level).


Any other lead (or comments regarding those) is welcome.

Regards,

Xiangh

PS: for information, the corresponding trace (well, some non significant function calls have been removed to focus on the critical part... especially since it was originally from a level 5 trace log)

Code:

 00:02:11 [1282665731006] Thread: XXX, Object: com.ibm.mq.MQQueue@e2df60d ==> put() entry
   00:02:11 [1282665731006] Thread: XXX, Object: com.ibm.mq.MQMessage@6eb8d517 ==> toByteArray() entry
   00:02:11 [1282665731006] Thread: XXX, Object: com.ibm.mq.MQMessage@6eb8d517 <== toByteArray() exit
  00:02:11 [1282665731006] Thread: XXX ==> MQSESSIONClient::MQPUT() entry
     00:02:11 [1282665731006] Thread: XXX, Object: com.ibm.mq.MQSESSIONClient@3b0bb517 ==> supportsV2Structures() entry
     00:02:11 [1282665731006] Thread: XXX, Object: com.ibm.mq.MQSESSIONClient@3b0bb517 <== supportsV2Structures() exit
     00:02:11 [1282665731006] Thread: XXX, Object: com.ibm.mq.MQMessage@6eb8d517 ==> writeTo() entry
     00:02:11 [1282665731006] Thread: XXX, Object: com.ibm.mq.MQMessage@6eb8d517 <== writeTo() exit
     00:02:11 [1282665731006] Thread: XXX, Object: com.ibm.mq.MQPutMessageOptions@28ae11cb ==> writeTo() entry
     00:02:11 [1282665731006] Thread: XXX, Object: com.ibm.mq.MQPutMessageOptions@28ae11cb <== writeTo() exit
     00:02:11 [1282665731006] Thread: XXX, Object: com.ibm.mq.MQv6InternalCommunications@3f418e04 ==> buildAPIHeader() entry
     00:02:11 [1282665731006] Thread: XXX, Object: com.ibm.mq.MQv6InternalCommunications@3f418e04 <== buildAPIHeader() exit
     00:02:11 [1282665731006] Thread: XXX, Object: com.ibm.mq.MQSESSIONClient@3b0bb517 ==> lowLevelComms() entry
       00:02:11 [1282665731007] Thread: XXX, Object: com.ibm.mq.MQv6InternalCommunications@3f418e04 ==> send() entry
         00:02:11 [1282665731007] Thread: XXX, Object: com.ibm.mq.MQv6InternalCommunications@3f418e04 ==> writeTSH() entry
         00:02:11 [1282665731007] Thread: XXX, Object: com.ibm.mq.MQv6InternalCommunications@3f418e04 <== writeTSH() exit
       00:02:11 [1282665731008] Thread: XXX, Object: com.ibm.mq.MQv6InternalCommunications@3f418e04 <== send() exit
       00:02:11 [1282665731008] Thread: XXX, Object: com.ibm.mq.MQv6InternalCommunications@3f418e04 ==> receive() entry
         00:02:11 [1282665731008] Thread: XXX, Object: com.ibm.mq.MQv6InternalCommunications@3f418e04 ==> receiveBytesFaster() entry
           00:02:11 [1282665731008] Thread: XXX, Object: com.ibm.mq.MQv6InternalCommunications@3f418e04 ==> timedReadInt() entry
           00:02:11 [1282665731027] Thread: XXX, Object: com.ibm.mq.MQv6InternalCommunications@3f418e04 <== timedReadInt() exit
           00:02:11 [1282665731027] Thread: XXX, Object: com.ibm.mq.MQv6InternalCommunications@3f418e04 ==> timedReadInt() entry
           00:02:11 [1282665731027] Thread: XXX, Object: com.ibm.mq.MQv6InternalCommunications@3f418e04 <== timedReadInt() exit
           00:02:11 [1282665731027] Thread: XXX, Object: com.ibm.mq.MQv6InternalCommunications@3f418e04 ==> timedReadFully() entry
           00:02:11 [1282665731027] Thread: XXX, Object: com.ibm.mq.MQv6InternalCommunications@3f418e04 <== timedReadFully() exit
         00:02:11 [1282665731028] Thread: XXX, Object: com.ibm.mq.MQv6InternalCommunications@3f418e04 <== receiveBytesFaster() exit
       00:02:11 [1282665731028] Thread: XXX, Object: com.ibm.mq.MQv6InternalCommunications@3f418e04 <== receive() exit
     00:02:11 [1282665731028] Thread: XXX, Object: com.ibm.mq.MQSESSIONClient@3b0bb517 <== lowLevelComms() exit
     00:02:11 [1282665731028] Thread: XXX, Object: com.ibm.mq.MQMessage@6eb8d517 ==> readFrom() entry
     00:02:11 [1282665731028] Thread: XXX, Object: com.ibm.mq.MQMessage@6eb8d517 <== readFrom() exit
     00:02:11 [1282665731028] Thread: XXX, Object: com.ibm.mq.MQPutMessageOptions@28ae11cb ==> readFrom() entry
     00:02:11 [1282665731028] Thread: XXX, Object: com.ibm.mq.MQPutMessageOptions@28ae11cb <== readFrom() exit
     00:02:11 [1282665731028] Thread: XXX Class: MQSESSIONClient CC,RC = 0,0
   00:02:11 [1282665731028] Thread:XXX <== MQSESSIONClient::MQPUT() exit
 00:02:11 [1282665731028] Thread: XXXX, Object: com.ibm.mq.MQQueue@e2df60d <== put() exit
Back to top
View user's profile Send private message
mvic
PostPosted: Thu Aug 26, 2010 5:54 am    Post subject: Re: Latency of technical acknowledgement during Reply with quote

Jedi

Joined: 09 Mar 2004
Posts: 2080

xiangh wrote:
we are using 6.0

What 6.0.a.b version, exactly?

And please answer:
- are the messages all persistent?
- are the messages all put inside a transaction / "syncpoint" ?
- if not, please describe persistence and syncpoint usage by the app
Back to top
View user's profile Send private message
mvic
PostPosted: Thu Aug 26, 2010 5:57 am    Post subject: Re: Latency of technical acknowledgement during Reply with quote

Jedi

Joined: 09 Mar 2004
Posts: 2080

xiangh wrote:
Low level tracing shows that almost all this time is spent inside MQSESSIONClient.lowLevelComms() during the call to receive() immediately following the actual send() [from what Isee, this is some kind of technical ack

I don't know what a technical ack is, but the elapsed time you see is the time taken by the server to enact the application's request.
Back to top
View user's profile Send private message
xiangh
PostPosted: Thu Aug 26, 2010 9:18 am    Post subject: Reply with quote

Newbie

Joined: 24 Aug 2010
Posts: 2

Hello,

Quote:
What 6.0.a.b version, exactly?

*** BuildInfo *** WebSphere MQ classes for Java (6.0.2.2)
*** BuildInfo *** j600-202-070711 (Production)

Quote:
are the messages all persistent?

According to the application configuration, yes

Quote:
are the messages all put inside a transaction / "syncpoint" ?

As far as I can see (and according to initial developer), not

Quote:
if not, please describe persistence and syncpoint usage by the app

None, the application has its own transaction system, which is not coordinated with MQ.... good thing you asked indeed...

Quote:
I don't know what a technical ack is, but the elapsed time you see is the time taken by the server to enact the application's request.

Technical ack : a message sent by the server to acknowledge he enacted our message. (for me the latency is the network_time_sent+enact_time+nework_time_ack... ptentially + maybe some naggle algorithm related delay, as our messages are rather small)

Thanks,

Xiangh
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Thu Aug 26, 2010 9:25 am    Post subject: Reply with quote

Grand High Poobah

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

10 ms sound a little bit much to me.
But then the experience I've had is a little bit different from what you are doing.

Let's say on an open queue going with a binding connection (memory pipe), with the message size you're talking about (< 4k) I'd have thought you should be able to achieve something like 4 ms... that would leave 6 ms to network latency in your case... (but then that's just me...)

A good point to start for you would be opening a PMR and working with IBM to achieve your goals. You might need to get the low latency edition of the software...
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
mvic
PostPosted: Thu Aug 26, 2010 11:08 am    Post subject: Reply with quote

Jedi

Joined: 09 Mar 2004
Posts: 2080

xiangh wrote:
Quote:
are the messages all persistent?

According to the application configuration, yes

Quote:
are the messages all put inside a transaction / "syncpoint" ?

As far as I can see (and according to initial developer), not

Put persistent messages INSIDE a transaction/syncpoint, then commit. MQ will not perform well if you put persistent messages outside syncpoints.
Back to top
View user's profile Send private message
gbaddeley
PostPosted: Thu Aug 26, 2010 5:24 pm    Post subject: Reply with quote

Jedi Knight

Joined: 25 Mar 2003
Posts: 2538
Location: Melbourne, Australia

Quote:
* Low level tracing shows that almost all this time is spent inside MQSESSIONClient.lowLevelComms() during the call to receive() immediately following the actual send() [from what Isee, this is some kind of technical ack)


MQ Client uses a synchronous protocol, ie. send the MQI request to the qmgr server, wait for MQI completion from the qmgr server. So there are two network and comms stack latencies for the TCP packets, plus the socket API calls and message processing in the qmgr.

You need to identify where the most time is being spent.
_________________
Glenn
Back to top
View user's profile Send private message
mqjeff
PostPosted: Thu Aug 26, 2010 6:21 pm    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

gbaddeley wrote:
Quote:
* Low level tracing shows that almost all this time is spent inside MQSESSIONClient.lowLevelComms() during the call to receive() immediately following the actual send() [from what Isee, this is some kind of technical ack)


MQ Client uses a synchronous protocol, ie. send the MQI request to the qmgr server, wait for MQI completion from the qmgr server. So there are two network and comms stack latencies for the TCP packets, plus the socket API calls and message processing in the qmgr.

You need to identify where the most time is being spent.


Yes.

AND.

You need to send persistent messages in a syncpoint, SO THAT the MQ API calls complete in the best possible time, REGARDLESS of whether you are using a client connection or the much faster bindings connection.
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 » Latency of technical acknowledgement during
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.