|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
Get order for multi threaded app's |
« View previous topic :: View next topic » |
Author |
Message
|
mvic |
Posted: Fri Feb 24, 2006 1:09 pm Post subject: |
|
|
 Jedi
Joined: 09 Mar 2004 Posts: 2080
|
x061294 wrote: |
There is concern by having one server running at 80 - 90% utilization while the other is at 5 - 10% utilization. Technically there is room on the first server to continue processing, and we could take the approach that wait until that server goes 100% before processing is failing over to the second server, but that just worries me, and others. |
I'm interested, how is the CPU usage distributed throughout the processes of the system? What is the most significant user of CPU - is it MQ or the apps? A sample ps -ef listing should give a good idea of this; one can look at the column that shows the total CPU time elapsed.
The fact you have considered separating off instances of MQGET-ting apps indicates you've reached a judgement that the app is the principal user of CPU. Is this right?
Here are a couple of ideas:
* make all apps client-bound, with some running locally (but using TCP/IP to connect) and some running remotely. They should all then get served on an equal basis, as far as one can tell anyway.
* do performance analysis on the app, and optimise it so it uses less CPU.
Kind regards |
|
Back to top |
|
 |
PeterPotkay |
Posted: Fri Feb 24, 2006 3:09 pm Post subject: |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
x061294 wrote: |
Again, logically it just made sense to me that a MQGET thread is an MQGET thread is an MQGET thread, regardless of client versus local. But it doesn't appear that that is the case. I'm sure that there are good reasons for that, but, then I would think that there should be a way to cause this result, and I don't know what that would be. |
x061294,
I don't think it has anything to do with the local GET versus a Client GET. Remember, in my scenario, all three GETs were clients only, and even they showed an uneven distribution. But who knows, maybe.... _________________ Peter Potkay
Keep Calm and MQ On |
|
Back to top |
|
 |
fjb_saper |
Posted: Fri Feb 24, 2006 9:52 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
I think it has much more to do with the uneven time it takes for the application to process any given message.
If the time to process the messages pans out in average it would mean that over a given intervall of time (several days) you would get a roughly 1/3, 1/3, 1/3 distribution. This being said variations (for 1 single day) may be extreme and still be within a statistical curve...
Remember as well that adding threads is not necessarily a linear progression model. (In fact I've seen the case where more threads (times 2) gave only a 1.5 throughput increase, mainly due to a db bottleneck...
Enjoy  _________________ MQ & Broker admin |
|
Back to top |
|
 |
mq_developer |
Posted: Thu Mar 02, 2006 1:47 pm Post subject: |
|
|
Voyager
Joined: 18 Feb 2002 Posts: 82
|
Quote: |
I think it has much more to do with the uneven time it takes for the application to process any given message.
|
Exactly , i also feel the same. "Pull" workload balancing will not result in even distribution and we shouldnt expect it to be neither, only the "Push" would. |
|
Back to top |
|
 |
mvic |
Posted: Thu Mar 02, 2006 1:52 pm Post subject: |
|
|
 Jedi
Joined: 09 Mar 2004 Posts: 2080
|
mq_developer wrote: |
"Pull" workload balancing will not result in even distribution and we shouldnt expect it to be neither, only the "Push" would. |
I'm interested in hearing more of the reasons behind this theory. |
|
Back to top |
|
 |
fjb_saper |
Posted: Thu Mar 02, 2006 2:52 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
The question I would like to ask is how do you evaluate an even distribution from x many messages if your processing time follows a normal curve and the average is 500 ms and standard deviation is 2 seconds...
Imagine you have 5000 msg in the pipe and 5 different threads processing. (pull mechanism).
Assuming each thread processes 1000 msg you have an avg of 500 seconds of processing time with extremes around 2500 seconds.
But your model is a first come first serve! You would need to run a random algorithm to determine the time each thread is processing and feed each thread as soon as it is done. At the end check how many msgs went to which thread....
Now looking over a long period of time and the law of big numbers etc... you all heard about it in advanced maths, everything else being equal in influence this should eventually even out to an even distribution.
But as displayed in this example the differences can be huge.
Image you have the same number of messages but are putting them to a Gateway qmgr in a cluster (push model ?)
You have 5 apps on different hosts consuming.
Assuming you have an even distribution model in your cluster you should expect each app server to service the same amount of requests (within 2 %) variance....
Each of the servers may need a different time intervall to service its load.
So what are the significant differences?
In the pull model the time needed by the servers to service the total load is nearly the same. (first come first serve until empty). The amount processed per server varies.
In the push model the amount processed per server is nearly equal but the time needed to do so varies per server.
Moral: if you are looking for throughput you are better served with a pull model than a push model. However when the pull model hits capacity you may have to resort to a push model. (Assured delivery)
Enjoy  _________________ MQ & Broker admin |
|
Back to top |
|
 |
|
|
|
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
|
|
|
|