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 Installation/Configuration Support » Performance with messages greater than 4MB

Post new topic  Reply to topic
 Performance with messages greater than 4MB « View previous topic :: View next topic » 
Author Message
jwendorf
PostPosted: Mon Jul 02, 2007 7:32 am    Post subject: Performance with messages greater than 4MB Reply with quote

Acolyte

Joined: 15 May 2001
Posts: 63
Location: Madison, WI

We have an application that is writing large jpeg messages to a queue, 2mb and larger.
Writing to the queue performs really well, but the get takes sometimes 14 seconds or longer to complete.

We have looked at the log set up for the queue manager and the placement on separate dasd and can not come up with anything. Has
anyone had experience with this?

Thanks.
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Mon Jul 02, 2007 7:42 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

What language? Which MQ API? How much memory does the receiving application have? How is the receiving application receiving the message?
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
Vitor
PostPosted: Mon Jul 02, 2007 7:51 am    Post subject: Reply with quote

Grand High Poobah

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

And what platform? What version / patch level of MQ?
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
jwendorf
PostPosted: Mon Jul 02, 2007 8:05 am    Post subject: Performance with messages greater than 4MB Reply with quote

Acolyte

Joined: 15 May 2001
Posts: 63
Location: Madison, WI

This is on a Windows 2003 server with service pack 1 and is running Websphere MQ v6.0.2.1. The application is written in Java and is using the MQ classes.
Back to top
View user's profile Send private message
jwendorf
PostPosted: Tue Jul 03, 2007 7:52 am    Post subject: Performance with messages greater than 4MB Reply with quote

Acolyte

Joined: 15 May 2001
Posts: 63
Location: Madison, WI

The test has been run with large and small heap sizes and the results have been the same. The developer has provided the code for the MQget:

package com.amfam.ecfuploader.batch;

import com.amfam.ecfuploader.business.ECFUploaderContext;
import com.amfam.ecfuploader.util.ECFMQUtil;
import com.ibm.mq.MQMessage;

/**
* @author tlw021
*
*/
public class TestRead {

public static void main(String[] args) {

System.out.println("Reading queue messages ");

try {
ECFUploaderContext.configure(new String[] { "com/amfam/ecfuploader/batch/batchConfig.xml" });
} catch (Exception e) {
System.out.println("Unable to configure spring" + e.getMessage());
e.printStackTrace();
}

// Kick off the request
int count = 0;

ECFMQUtil ecfMQUtil = (ECFMQUtil) ECFUploaderContext.getBean("ecfUploader.ECFMQUtil");

try {

long beginTime = System.currentTimeMillis();

int numMsgs = ecfMQUtil.queueDepth();
System.out.println("Messages in queue = " + numMsgs);

System.out.println("Time to retreive queue depth:" + (System.currentTimeMillis() - beginTime) + " milliseconds");

for (int i = 0; i < numMsgs; i++) {
// need to retrieve from spring singleton="false" - MQ session data is rememebered
ecfMQUtil = (ECFMQUtil) ECFUploaderContext.getBean("ecfUploader.ECFMQUtil");
try {
beginTime = System.currentTimeMillis();
MQMessage msg = ecfMQUtil.getQueueMessage();

// message may have been read by another process
if (msg != null) {
System.out.println("Time to get message:" + (System.currentTimeMillis() - beginTime)+ " milliseconds");
System.out.println("Message Type = " + msg.messageType);
System.out.println("Message Length = " + msg.getMessageLength() + "\n");
} else {
System.out.println("only read " + count + " message even though queue depth was " + numMsgs);
break;
}
} finally {
try {
ecfMQUtil.getClose(true);
} catch (Exception e) {
// ignore
System.out.println("unable to close/commit get Message");
}
}
count++;
}
} catch (Exception e) {
System.out.println("Error occured reading messages. " + e.getMessage());
e.printStackTrace();
}

System.out.println("Read " + count + " messages.");
}
}
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Tue Jul 03, 2007 7:58 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Gosh, what a horribly written program.

DO NOT do
Code:
int numMsgs = ecfMQUtil.queueDepth();
for (int i = 0; i < numMsgs; i++) {


ESPECIALLY when you're GETTING messages.
_________________
I am *not* the model of the modern major general.


Last edited by jefflowrey on Tue Jul 03, 2007 10:35 am; edited 1 time in total
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue Jul 03, 2007 10:31 am    Post subject: Reply with quote

Grand High Poobah

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

jefflowrey wrote:
Gosh, what a horribly written program.


I'd second that. That's a terrible way of doing it. Look at some of the sample code for better ways.

How does the ecfMQUtil class handle connections? Does the method getQueueMessage connect each time it trys to get a message? That'll kill your performance stone dead.
_________________
Honesty is the best policy.
Insanity is the best defence.
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 Installation/Configuration Support » Performance with messages greater than 4MB
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.