Author |
Message
|
cicsprog |
Posted: Tue Aug 17, 2004 9:06 am Post subject: MQPUT1 vs MQGET CPU times |
|
|
Partisan
Joined: 27 Jan 2002 Posts: 347
|
I have an IMS application that added MQ API calls to several programs. From the SMF reports I see using the MP1B service pack, I see a lot larger CPU times for MQPUT1 vs. MQGET. Does someone know why? I would think MQGET would be equal or more. The app is only putting one message via the MQPUT1 and terminating the IMS transaction.
Thanks |
|
Back to top |
|
 |
EddieA |
Posted: Tue Aug 17, 2004 9:57 am Post subject: |
|
|
 Jedi
Joined: 28 Jun 2001 Posts: 2453 Location: Los Angeles
|
MQPUT1 actually does an MQOPEN, MQPUT, and MQCLOSE.
Cheers, _________________ Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0 |
|
Back to top |
|
 |
cicsprog |
Posted: Tue Aug 17, 2004 10:28 am Post subject: |
|
|
Partisan
Joined: 27 Jan 2002 Posts: 347
|
right....but the question is GET vs PUT.
Incidently, the MP16 service pack recommends using PUT1 for efficency and its cheaper when putting single message rather than OPEN PUT CLOSE. |
|
Back to top |
|
 |
bower5932 |
Posted: Tue Aug 17, 2004 10:38 am Post subject: |
|
|
 Jedi Knight
Joined: 27 Aug 2001 Posts: 3023 Location: Dallas, TX, USA
|
If you are only putting a message, then MQPUT1 will be faster than the MQOPEN, MQPUT, MQCLOSE which is why it is recommended. So, if you are using MQPUT1 it will take longer. I've never done any testing of the relative speed of a simple MQPUT vs. MQGET. |
|
Back to top |
|
 |
cicsprog |
Posted: Tue Aug 17, 2004 11:03 am Post subject: |
|
|
Partisan
Joined: 27 Jan 2002 Posts: 347
|
brandon...agreed....get your point PUT vs PUT1 |
|
Back to top |
|
 |
clindsey |
Posted: Tue Aug 17, 2004 1:10 pm Post subject: |
|
|
Knight
Joined: 12 Jul 2002 Posts: 586 Location: Dallas, Tx
|
Are the messages persistent? I wouldn't be surprised for the put to take longer when the messages have to be persisted.
Charlie |
|
Back to top |
|
 |
cicsprog |
Posted: Tue Aug 17, 2004 1:27 pm Post subject: |
|
|
Partisan
Joined: 27 Jan 2002 Posts: 347
|
These msgs are nonpersistent. They are destined for a Windows MQM via a CLUSTER channel. Here is a snip of SMF116 for this MPR tran:
MVS:S6 ,MQSeries sys:MQAA ,Jobname:IMA1 ,Userid:xxxxx ,Da
====> New task record found <==========
== Thread type............> IMS MPP/BMP
== Connection name........> IMA1
== Operator id............> G0xxxxx
== User identifier........> IMA1MVX4
== Channel name...........>
== Chl Connection.........>
== Correlator Id..........> 0103NCBP3184
== Correlator Id.....(HEX)> F0F1F0F3D5C3C2D7F3F1F8F4
== Context token..........>
== Context token.....(HEX)> 00000000000000000000000000000000
== NID....................>
== NID...............(HEX)> 40404040404040400000000000000000
== accounting token.......>
== accounting token..(HEX)> 00000000000000000000000000000000000000000000
== UOW identifier.........> F
== UOW identifier....(HEX)> 40404040404040404040404040404040BBAEB11A34C60001
== Task Token : 17/08/2004, 14:58:39.81, 5baaa5f8, 5ba49768
== Interval : START 17/08/2004, 14:58:39.81
== Interval : END 17/08/2004, 14:58:39.89
== Other requests : Count 1,Avg elapse 43,Avg CPU 42
== Pages : New 4 ,Old 1
== Task Token : 17/08/2004, 14:58:39.81, 5baaa5f8, 5ba49768
Open name VSE.PRD.SYNC.NCV , Base name SYSTEM.CL
First opened : 17/08/2004, 14:58:39.87
Last closed : 17/08/2004, 14:58:39.87
QType Local QSGtype: Q_MGR IndexType : Q_MGR
Pageset identifier: 1, Bufferpool: 1
Current opens : 0 , Total Requests : 1
PUTs : Valid 1 Max size 33 Min Size 33 Total bytes 0
MQCall N ET CT Susp LOGW PSET Epa
Put1 1 722 694 0
#persistent msgs MQGET: 0 MQPUT: 0 MQPUT1: 0 |
|
Back to top |
|
 |
PeterPotkay |
Posted: Tue Aug 17, 2004 7:43 pm Post subject: |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
cicsprog, what will take longer/use more cpu? MQGET? Or (MQOPEN+MQPUT+MQCLOSE)?
Opening a queue is much more cpu intensive then getting or putting. So if the MQPUT1 call encompasses a MQOPEN+MQPUT+MQCLOSE, then it will use more CPU than an MQGET. _________________ Peter Potkay
Keep Calm and MQ On |
|
Back to top |
|
 |
gunter |
Posted: Tue Aug 17, 2004 10:57 pm Post subject: |
|
|
Partisan
Joined: 21 Jan 2004 Posts: 307 Location: Germany, Frankfurt
|
Maybe I'm wrong, but I assume, that also MQPUT, not only MQPUT1, is more expensive than MQGET because it's more afford to write safe than to read. _________________ Gunter Jeschawitz
IBM Certified System Administrator - Websphere MQ, 5.3 |
|
Back to top |
|
 |
LuisFer |
Posted: Wed Aug 18, 2004 12:19 am Post subject: |
|
|
 Partisan
Joined: 17 Aug 2002 Posts: 302
|
Hi all:
Using ASG's Tmon over MVS (z/OS 1.4) MQ V531 this is a little measure from 3 Q.
The Put1 is a Command Server APP. ( The MA10 SP).
The Put & Get are for 2 OTMA Queues with a Pre-Open done.
PUT1 CPU time:0.0014 PUT1 calls: 3 Total PUT bytes: 645 PUT max. msg. size: 215 PUT min. msg. size: 215
PUT CPU time: 0.0215 PUT calls: 224 Total PUT bytes: 56,817 PUT max. msg. size: 541 PUT min. msg. size: 499
GET CPU time: 0.0301 GET calls: 225 Total GET bytes: 517,603 GET max. msg. size: 29,895 GET min. msg. size: 212
It's a little interval & all the msg's are NPM , SEND_THEN_COMMIT. |
|
Back to top |
|
 |
cicsprog |
Posted: Wed Aug 18, 2004 2:53 am Post subject: |
|
|
Partisan
Joined: 27 Jan 2002 Posts: 347
|
Humm......some interesting posts. Anyone know how the CPU is being charged back? So, since IMS is the TP monitor here, is all the CPU being charged back to IMS transaction (rollup of MQ and TCP addr spaces CPU charged back to IMS tran)? Since the MQPUT is destined for Windows MQM via CLUSTER Channel, not sure where CPU chargeback would end. When the commit happens on the destination MQM? Sorry for the nuts and bolts questions...we are short on CPU cycles. So I am trying to figure out if this is just BAU as coded, or do I have an app problem/MQM config problem.
Jason |
|
Back to top |
|
 |
cicsprog |
Posted: Wed Aug 18, 2004 10:45 am Post subject: |
|
|
Partisan
Joined: 27 Jan 2002 Posts: 347
|
FYI
LV1 says IMS SMF transaction record would record CPU usage rolledup for MQ and MCA work (but not TCPIP)....CICS single transaction SMF record does same thing for DB2 usage. That didn't surprise me. |
|
Back to top |
|
 |
LuisFer |
Posted: Wed Aug 18, 2004 12:15 pm Post subject: |
|
|
 Partisan
Joined: 17 Aug 2002 Posts: 302
|
Cicsprog:
MQ Commit 1 (Send_then_commit) use less CPU because the msg don't write to the WADS, the default is Commit 0 (Commit_then_Send)
Review the OTMA security (none/check less CPU)
Review the use of SyncPoint & the Persistence.
I hope that help you.
Regards.
pd: As possible. |
|
Back to top |
|
 |
bduncan |
Posted: Thu Aug 19, 2004 4:32 pm Post subject: |
|
|
Padawan
Joined: 11 Apr 2001 Posts: 1554 Location: Silicon Valley
|
The performance of the MQGET depends heavily on whether you have set any matching parameters. Doing an MQPUT to a queue simply tacks it on the end, hence FIFO. Doing an MQGET matching against CorrelId for instance, will obviously take much longer against a queue with 300,000 messages on it than a queue with 1 message on it  _________________ Brandon Duncan
IBM Certified MQSeries Specialist
MQSeries.net forum moderator |
|
Back to top |
|
 |
alperb |
Posted: Sat Nov 26, 2005 1:06 am Post subject: |
|
|
Apprentice
Joined: 01 Jun 2004 Posts: 25
|
bower5932 wrote: |
If you are only putting a message, then MQPUT1 will be faster than the MQOPEN, MQPUT, MQCLOSE which is why it is recommended. So, if you are using MQPUT1 it will take longer. I've never done any testing of the relative speed of a simple MQPUT vs. MQGET. |
what is the C++ version of MQPUT1? I saw in COBOL and C but couldn't find anything regarding C++? |
|
Back to top |
|
 |
|