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 API Support » MQ5.3 client performance with .Net

Post new topic  Reply to topic
 MQ5.3 client performance with .Net « View previous topic :: View next topic » 
Author Message
tony
PostPosted: Thu Oct 21, 2004 9:21 pm    Post subject: MQ5.3 client performance with .Net Reply with quote

Newbie

Joined: 21 Oct 2004
Posts: 4
Location: MN

Hi,
I have a question. We have a multithreaded app on Win XP . C# and SQL server. 1 thread using MQ client to get the message from the server queue, convert the message and store it to the database. Using 5.3 client. The rate for pulling the messages is very slow. Can you give me some advices how to design this thread so the speed will increase? I need at least 10 per second. Is it even possible with 5.3? Thanks.
Back to top
View user's profile Send private message
kirani
PostPosted: Thu Oct 21, 2004 10:25 pm    Post subject: Reply with quote

Jedi Knight

Joined: 05 Sep 2001
Posts: 3779
Location: Torrance, CA, USA

Well it depends on your design. Can you explain how you are doing MQGET from the queue? There is also a performance supportPac for WMQ. You can find some good stats for MQI calls.
_________________
Kiran


IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries

Back to top
View user's profile Send private message Visit poster's website
tony
PostPosted: Fri Oct 22, 2004 7:32 am    Post subject: Reply with quote

Newbie

Joined: 21 Oct 2004
Posts: 4
Location: MN

Thanks,
mqMsg = new MQMessage();
mqGetMsgOpts = new MQGetMessageOptions();
mqGetMsgOpts.Options= MQC.MQGMO_WAIT + MQC.MQGMO_FAIL_IF_QUIESCING+MQC.MQGMO_SYNCPOINT;
mqGetMsgOpts.WaitInterval = 3000; // 3 second limit for waiting
try
{
mqQueue.Get( mqMsg, mqGetMsgOpts);
}

After I get the message, I convert it and store to SQL server. I do not know yet where is slow down, but probably in the store to the database.
Should I create separate thread and do the store there to free up the time? Any other ideas? Thanks for helping.
Back to top
View user's profile Send private message
kirani
PostPosted: Fri Oct 22, 2004 8:55 am    Post subject: Reply with quote

Jedi Knight

Joined: 05 Sep 2001
Posts: 3779
Location: Torrance, CA, USA

What is your current processing rate? Do the messages on the queue exist before you read them? The reason I ask this is because you have specified WaitInterval in your code. This is not necessary if you don't want the messages to come-in.
Are you reading any specific message (using Correl-Id or Msg-Id)? This could also take time.
It'd be better to split DB and MQ processing into two different threads.
_________________
Kiran


IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries

Back to top
View user's profile Send private message Visit poster's website
gunter
PostPosted: Fri Oct 22, 2004 9:16 am    Post subject: Reply with quote

Partisan

Joined: 21 Jan 2004
Posts: 307
Location: Germany, Frankfurt

Quote:
It'd be better to split DB and MQ processing into two different threads.


The requirement is 10 msg/sec. This should be possibble without threads. If you use two threads, the program is more complicated and you have other problems too. ( thread syncronisation, memory if mq is faster than db ... )
At first determine the code that slows down the application. I recommend putting timestamps in the code or use profiling. Perforemance optimization without knowing the bottleneck isn't a good idea.
_________________
Gunter Jeschawitz
IBM Certified System Administrator - Websphere MQ, 5.3
Back to top
View user's profile Send private message
kirani
PostPosted: Fri Oct 22, 2004 12:37 pm    Post subject: Reply with quote

Jedi Knight

Joined: 05 Sep 2001
Posts: 3779
Location: Torrance, CA, USA

I agree that the program will be complicated if using more threads. But, if his insert takes long time and if he is not able to resolve the DB problem then that's the only option to process MQ mesages in parallel.
It happened once in our environment, there was some problem with the DB and the person was doing some XML parsing in his program after retriving the message from the queue, which was also taking more time. His general statement was "MQ is reading messages slowly".

Tony, it'd be better to capture timings for group of actions (MQ and DB) within your program to identify problem area first.
_________________
Kiran


IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries

Back to top
View user's profile Send private message Visit poster's website
zpat
PostPosted: Mon Oct 25, 2004 4:12 am    Post subject: Reply with quote

Jedi Council

Joined: 19 May 2001
Posts: 5866
Location: UK

The code looks OK. Unlikely to be MQ holding things up unless your network is very slow.

Running several of these threads at once might help overlap message and database processing.
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 API Support » MQ5.3 client performance with .Net
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.