SlideShare a Scribd company logo
1 of 42
Download to read offline
© 2015 IBM Corporation
2279: IBM MQ Better
Application
Performance
Mark Taylor
marke_taylor@uk.ibm.com
IBM Hursley
Please Note
IBM’s statements regarding its plans, directions, and intent are subject to change
or withdrawal without notice at IBM’s sole discretion.
Information regarding potential future products is intended to outline our general
product direction and it should not be relied on in making a purchasing decision.
The information mentioned regarding potential future products is not a
commitment, promise, or legal obligation to deliver any material, code or
functionality. Information about potential future products may not be incorporated
into any contract. The development, release, and timing of any future features or
functionality described for our products remains at our sole discretion.
Performance is based on measurements and projections using standard IBM
benchmarks in a controlled environment. The actual throughput or performance
that any user will experience will vary depending upon many factors, including
considerations such as the amount of multiprogramming in the user’s job stream,
the I/O configuration, the storage configuration, and the workload processed.
Therefore, no assurance can be given that an individual user will achieve results
similar to those stated here.
Agenda
• Some performance numbers
• Structure of the Queue Manager
• Function Walkthroughs
• Client Channels
• Logging and Recovery
Agenda
• Some performance numbers
• Structure of the Queue Manager
• Function Walkthroughs
• Client Channels
• Logging and Recovery
Performance Bottlenecks
• Business Systems are complex
‒ Often no single bottleneck limiting performance
‒ Performance can mean different things to different people
‒ Throughput
 Scalability
 Low resource usage
• Not only limited by physical resources
‒ Application design, such as parallelism can have major effect
• Performance Reports (from SupportPac site) show range of
scenarios
RAM CPU NetworkI/O
Bottlenecks
See how far it's come …
Distributed Performance: Persistent Messaging
• An AIX system: Max performance increased from 16K to 19K
Distributed Performance: Non-persistent Messaging
• A Windows system: Max performance increased from 90K to 121K
Distributed Performance in V8
• Improvements to distributed queue manager scaling
‒ Improve efficiency
‒ Better exploitation of wider SMP machines
‒ Looking at customer-provided application patterns not just benchmarks
 Always happy to have more customer examples
• Multiplexed client performance
‒ Increase the performance of multiplexed client channels (SHRCONV > 0)
‒ Especially for SHRCONV=1
• Other areas that helped:
‒ Cache alignment for internal structures
‒ Extended 64-bit exploitation for locking primitives
‒ RFH2 handling, particularly for waiting-getter
 Fewer copies of data are needed
‒ Better compiler optimisations including feedback-directed optimisation
‒ Faster data conversion (especially for 1208)
 Many messages are in 1208 codepage
 Optimised handling when the queue manager needs to convert them
Agenda
• What is distributed WebSphere MQ?
• Structure of the Queue Manager
• Function Walkthroughs
• Client Channels
• Logging and Recovery
Also:
runmqchi
runmqlsr
amqzdmaa
amqrmppa
amqpcsea
Execution
Controller
(amqzxma0)
Critical
Services
(amqzmuc0)
Restartable
Services
(amqzmur0)
External
Processes
(amqzmgr0)
Repository
Manager
(amqrrmfa)
Object
Authority
Manager
(amqzfuma)
LQM
Agent
(amqzlaa0)
Queue Manager Process Tree
V6V7.x,
V8
PubSub
V6 Compat
(amqfqpub)
PubSub
Streams
(amqfcxba)
PubSub Utils
(amqzmuf0)
Dur/Subs
Mgr
Topic
Scavenger
Multicast
Brw/Mark
Delayed Deliv
Cache,
Inter QMgr
Agent
Queue Manager
Shared Resources
Checkpoint
MQCONN
MQCONN
MQOPEN
MQDISC
MQPUT
MQGET
etc.
Agent
IPCC
Execution
Controller
IPCC
Log Manager
MQI Stub
Application
IPCC
MQI Stub
Application
IPCC
MQI Stub
Application
IPCC
Object
Authority
Manager
Queue Manager: Process Model
Shared, Isolated and
Trusted Bindings
Agenda
• What is distributed WebSphere MQ?
• Structure of the Queue Manager
• Function Walkthroughs
• Client Channels
• Logging and Recovery
MQI Stub
Application
IPCC
Execution
Controller
IPCC
IPCC
DAP
Kernel
Agent
IPCC
Application (MQI Stub)
Verify parameters and handles
Construct a Connect message
Call API crossing exit
Send a message to the EC
Application (MQI Stub)
Receive the reply
Construct an IPCC message
Send the message to the agent
Application (MQI Stub)
Receive reply and call API crossing exit
Return HCONN
Execution Controller
Choose an agent or start a new one
Construct a reply IPCC message
Return reply to application
Agent
Check App's permission to connect
Allocate and assign agent resources
Send IPCC reply back to application
MQCONN
Performance Implications: Connection Binding
• Fastpath binding removes inter-process communications
‒ Implies that the application is 'trusted'
‒ MQCONNX option MQCNO_FASTPATH_BINDING
‒ Application failure can corrupt queue manager
• Primary benefit is for non-persistent message processing
‒ Use for MCAs, Broker
 - 30% CPU saving
MQ
Appl
Agent
Memory
Log
IPC
Standard
Binding
MQ
Appl
Agent
Memory
Log
FASTPATH
Binding
Performance Implications: Connection Binding
MQ
Appl
Agent
Memory
Log
IPC
Standard
Binding
MQ
Appl
Agent
Memory
Log
FASTPATH
Binding
MCA Agent
Memory
Log
IPC
Client
Binding
MQ
Appl
Network
Application (MQI Stub)
Verify hConn
Call API crossing exit
Verify parameter addressability
Place parameters in an Open message
Send an IPCC message to the agent
MQI Stub
Application
IPCC
DAP
Kernel
Agent
IPCC
Agent
Application interface
 Verify open parameters
Kernel
Verify operation validity
Resolve target – including cluster lookup
Check permissions on the queue
DAP
Load the queue ready for gets and puts if required
ƒThis is the part that can use system resources
Kernel
Generate handle to object for application
Generate responses and event messages
IPCC
Send reply back to application
Application (MQI Stub)
Receive reply
Call API crossing exit
Return HOBJ
MQOPEN of a queue
MQOPEN internal changes for V8
• The object catalog is the list of objects and a map to the real files
‒ Shows that queue 'X.Y' is stored in "/var/mqm/qmgrs/<qm>/queues/X!Y"
‒ dspmqfls command shows the map
‒ Updated whenever an object is created or deleted
• In MQ V7 there were just two locks associated with the object catalog
‒ A significant implication of this scheme was that an MQOPEN could not
overlap with the creation/deletion of a queue (or any other object)
‒ Ghost queues introduced in MQ V5.2 went some way to reducing the impact,
particularly for TDQ’s, but very significant serialization implications remained.
• MQ V8 uses finer grained locks
‒ The master mutex need not be owned while waiting for the object mutex.
• The most significant impact of this serialization change is that dynamic
queues can now be created and destroyed concurrently with MQOPEN
activity
27
Performance Implications: Heavyweight MQI Calls
• MQCONN is a “heavy” operation
‒ Don’t let your application do lots of them
‒ Wrappers and OO interfaces can sometimes hide what’s really happening
‒ Lots of MQCONNs can drop throughput from 1000s Msgs/Sec to 10s
Msgs/Sec
• MQOPEN is also ‘heavy’ compared to MQPUT/MQGET
‒ Depends on the type of queue and whether first use
 Loading pre-existing queue; creating dynamic queue
‒ It’s where we do the security check
 Try to cache queue handles if more than one message
‒ If you’re only putting one message consider using MQPUT1
 Particularly client bindings
• Try to avoid exclusive access to the Queue
‒ Makes it harder to scale the solution
 For example adding more instances of application
‒ Implies that reliance on message order is not required
 Partition the data to allow parallel processing?
01 00 00 01 01
01 01 11 11 11
11 11 11 00 00
00 00 01 01 01
00 00 00 00 00
11 11 11 11 11
10 10 10 10 10
10 10 10 10 10
01 00 00 01 01
01 01 11 11 11
11 11 11 00 00
00 00 01 01 01
00 00 00 00 00
11 11 11 11 11
10 10 10 10 10
10 10 10 10 10
Space Map
01 00 00 01 01
01 01 11 11 11
11 11 11 00 00
00 00 01 01 01
00 00 00 00 00
11 11 11 11 11
10 10 10 10 10
10 10 10 10 10
Non-
persistent
Message
Detail
Cache
Queue file
Log
Message Chain(s)
Space Hdl
File System
Buffer
Overflow
Persistent
Queue Buffer
NP Queue
Buffer
Overflow
Persistent
In the Depths of a Queue
Tuning Queue Buffers
• Increasing buffers can improve performance
‒ More information can be kept in memory, without flushing to disk
‒ Costs more memory per modified queue
• But no documented external mechanism to do it
‒ Performance supportpacs indicate how to do it
‒ DefaultQBufferSize / DefaultPQBufferSize
‒ SupportPac MS0P (Cat2 – ie “as-is”) includes “QTune” program
c:> java -jar qtune.jar -d c:mqmqmgrsQMAqueuesSYSTEM!DEFAULT!LOCAL!QUEUE
File c:mqmqmgrsQMAqueuesSYSTEM!DEFAULT!LOCAL!QUEUEq
Stored npBuff = 64 kB
Stored pBuff = QMgr default
Stored maxQSize = 2,097,151 MB
Performance Implications: Persistence
• Log bandwidth is going to restrict throughput
‒ Put the log files on the fastest disks you have, separate from queue file
‒ Persistent messages are the main things requiring recovery after an outage
‒ Can significantly affect restart times
• Why use persistence?
‒ False assumption that persistence is for "important" data and nonpersistent for
when you don't care
‒ The real reason for persistent messages is to reduce application complexity
‒ With persistent, apps do not need logic to detect and deal with lost messages
‒ If your app (or operational procedures) can detect and deal with lost
messages, then you do not need to use persistent messages
• Understand which apps use persistence
MQPUT Queue File
Log
Kernel
Verify operation validity
(Resolve cluster queue destination)
DAP
Reserve space for the message data
If (persistent message)
Write log records for the update
(Wait for log records to reach the disk if outside syncpoint)
Write the message to the queue file
Else (non-persistent)
If (space available in queue buffer)
Copy the message data into the buffer
Else
Write the message to the queue file without logging
Maintain queue statistics such as queue depth
Kernel
Generate responses and events, wakeup getters/drive async consumers
Serialised
MQPUT Walkthrough
Also check for "if waiting getter"
Tip!
Use persistent messages with
syncpoint
Put to a waiting getter
• MQPUT most efficient if there is getting application waiting
‒ Having multiple applications processing queue increases percentage
‒ May not appear ‘balanced’ – May keep one ‘hot’
• Only for out of syncpoint messages
‒ Both persistent and non-persistent
‒ If Persistent outside of syncpoint, think carefully about why using persistence
 Got message could be lost if crash before returning to the application!
• No queuing required
‒ Removes a lot of processing of placing the message onto the queue
• Significantly reduces CPU cost and improves throughput
‒ Lots of improvements on this area in newest releases (7.1, 7.5)
MQPUT MQGET
MQGET
MQGET
Kernel
Verify operation validity
Check message expiry
Wait for message if not available
DAP
Locate a message meeting the requested criteria including
current browse cursor position
priority
message id, correlation id, segment or group conditions
Copy data into the message buffer
If (persistent)
Write log record
(Wait for log record to reach the disk if outside syncpoint)
Move the browse cursor if required
Maintain queue statistics such as queue depth
Kernel
Generate responses and events
Serialised
MQGET Walkthrough
Tip!
In request reply model, get by correlid
more efficient than get by msgid
Kernel
Verify operation validity
DAP
Write log record to end transaction
Wait for this log record to reach the disk
Lock all queues touched in this transaction
For each queue
Make any changes to messages in the transaction visible
Unlock queue
Kernel
Generate responses and events
Wakeup Getters/Drive Async Consumers
MQCMIT Walkthrough
Deal with 2PC protocol if in an
XA transaction
Performance Implications: Syncpoint
• Do you need it?
‒ Yes, when a set of work needs to either all be performed, or all not performed
• Maximum Size of UOW can be limited
‒ QMGR MAXUMSGS parm
‒ Set to sensible value to avoid runaway applications
• Make sure you keep the size of your UOWs small
‒ Don’t forget to end the UOW
• Cheaper to process in syncpoint for persistent messages
‒ Up to a point, not huge UOWs
‒ Log not forced after every MQPUT/MQGET
• Useful even when only a single message inside syncpoint
‒ And running multiple parallel applications
Good Application Design - Summary
• Long-running connection
• Opens queues up-front
• Uses syncpoint for persistent operations
• No message affinities so multiple instances can run in parallel
Publish/Subscribe Implementation from V7
• MQOPEN, MQPUT, MQGET very similar to point-to-point
‒ Includes cluster resolution
‒ Need to find closest admin topic node
‒ Internal subscribers may forward publication to another queue manager
• Durable Subscriptions held on SYSTEM.DURABLE.SUBSCRIBER.QUEUE
‒ Multiple subscriptions consolidated into single message
‒ Why is there no non-durable subscriber queue?
‒ Retained publications also stored on a queue
• Handling application abend
‒ V6 cleanup for non-durable subs was “automatic” for JMS, manual otherwise
‒ Automatic for V7+
• Managed destinations
‒ Agent creates queue in MQSUB - trace shows internal MQOPEN (kqiOpenModel)
• Parallel match-space access via shared memory set
‒ Several applications can publish simultaneously on the same topic
‒ Lock held during subscribe/unsubscribe processing
Message Processing
• Persistent pubs switch to non-persistent-ish for non-durable
subscriptions
‒ Does not change the reliability level
‒ Messages are not logged, but they keep the “persistent” flag
‒ Improves performance
• Properties stored as part of the message
‒ Logged for persistence, rcdmqimg etc
‒ Written to disk in either RFH2 or an “internal” format
‒ Converted to application-required format during MQGET
• Selectors on queues can cause all messages to be browsed
‒ Queue lock may be held during selection
Agenda
• What is distributed WebSphere MQ?
• Structure of the Queue Manager
• Function Walkthroughs
• Client Channels
• Logging and Recovery
• Multiple Installation Support
Clients from V7
• Many changes to the client protocols in V7
‒ All can improve performance
• Multiplexing or Shared Conversations
‒ For multi-threaded applications
‒ Several connections use the same socket
• Asynchronous Put
‒ For sending applications
• Read-ahead
‒ For receiving applications
• New threads inside application for full-duplex comms
‒ Sharecnv(0) – May be fast but no full-duplex so miss good functionality
‒ Sharecnv(1) – One socket per hconn, optimised in V8 - recommended value
‒ Sharecvn(10) – Shared socket for multiple conversations (default value)
Client
Asynchronous Put Response
MQCONN
MQOPEN
MQOPEN
MQPUT
MQPUT
MQPUT
MQPUT
MQCMIT
Server
Read-ahead of messages
Client
MQCONN
MQOPEN
MQGET
MQGET
MQGET
Server
Request for
‘n’ messages
Client Connection Performance.
• Lots of internal changes at V8
‒ Channel status table restructure
‒ Reduce cost of health checking (MQIBindType=FASTPATH)
‒ Keep a hash table of processes, each with a sub-list of threads.
‒ Reduce cost of creating/deleting TDQ’s
‒ Channel process pooling pre-start
• Net effect of all of these changes is significant improvement to the queue
manager’s ability to accept a large number of inbound connections in a
relatively short time.
• In one test the time taken to attach 50,000 clients, with each client
owning a TDQ, reduced from over an hour at 7.0.1.6 to under 4 minutes
at MQ V8.
59
Agenda
• What is distributed WebSphere MQ?
• Structure of the Queue Manager
• Function Walkthroughs
• Channels
• Logging and Recovery
• Multiple Installation Support
What's the point of logging?
• A log record is written for each persistent update
‒ The log record describes the update
• Optimisations to minimise serialisation points
• Write-Ahead Logging
‒ The log is always more up-to-date than the actual data
• Log is a sequential file
‒ Sequential I/O is much quicker than random
‒ Single point of writing rather than to individual object files
• Log and actual data are reconciled during strmqm
‒ Progress information displayed
• Point of consistency – Checkpoint
‒ Log control file: amqhlctl.lfh – in log directory
‒ Checkpoint amqalchk.fil – qmgr directory
‒ Backup queue managers from MQ V6
Myth!
Triple write integrity does not mean
we write all data 3 times!
Looking at logger performance
• Can extract internal information from a service tool
‒ Lots of MQ performance PMRs turn out to be disk-related. So recording was
added to the internal state
 amqldmpa –c H –m <qmgr> -d 8 –n <count> -s <interval> -f <file>
‒ The amqldmpa program can dump lots of other internal information too
• Includes logger I/O activity
‒ WriteTimeMax shows maximum time (microseconds) to complete I/O
‒ WriteSizeMax shows largest (bytes) I/O
‒ Since qmgr started
• Maintains averages
‒ WriteSizeShort is short-term (64-sample) weighted average of recent writes
‒ WriteSizeLong is longer-term (1024-sample) weighted average
‒ Similarly for WriteTimeShort/Long
• From one PMR:
‒ WriteTimeMax = 59102377, WriteSizeMax=2097152
‒ So it has taken nearly 60 seconds to write 2MB
‒ Implies they need to talk to disk support team!
Summary – understand the applications
• Understand the application pattern
‒ Exclusivity, affinity
• Understand the individual application
‒ Many times have heard "it's using persistence" when it's not. Or vice versa.
• If you don't have access to application source, tools exist to help
‒ Application Activity Reports
‒ MQ Trace
Notices and Disclaimers
Copyright © 2015 by International Business Machines Corporation (IBM). No part of this document may be reproduced or
transmitted in any form without written permission from IBM.
U.S. Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with
IBM.
Information in these presentations (including information relating to products that have not yet been announced by IBM) has been
reviewed for accuracy as of the date of initial publication and could include unintentional technical or typographical errors. IBM
shall have no responsibility to update this information. THIS DOCUMENT IS DISTRIBUTED "AS IS" WITHOUT ANY WARRANTY,
EITHER EXPRESS OR IMPLIED. IN NO EVENT SHALL IBM BE LIABLE FOR ANY DAMAGE ARISING FROM THE USE OF
THIS INFORMATION, INCLUDING BUT NOT LIMITED TO, LOSS OF DATA, BUSINESS INTERRUPTION, LOSS OF PROFIT
OR LOSS OF OPPORTUNITY. IBM products and services are warranted according to the terms and conditions of the
agreements under which they are provided.
Any statements regarding IBM's future direction, intent or product plans are subject to change or withdrawal without
notice.
Performance data contained herein was generally obtained in a controlled, isolated environments. Customer examples are
presented as illustrations of how those customers have used IBM products and the results they may have achieved. Actual
performance, cost, savings or other results in other operating environments may vary.
References in this document to IBM products, programs, or services does not imply that IBM intends to make such products,
programs or services available in all countries in which IBM operates or does business.
Workshops, sessions and associated materials may have been prepared by independent session speakers, and do not
necessarily reflect the views of IBM. All materials and discussions are provided for informational purposes only, and are neither
intended to, nor shall constitute legal or other guidance or advice to any individual participant or their specific situation.
It is the customer’s responsibility to insure its own compliance with legal requirements and to obtain advice of competent legal
counsel as to the identification and interpretation of any relevant laws and regulatory requirements that may affect the customer’s
business and any actions the customer may need to take to comply with such laws. IBM does not provide legal advice or
represent or warrant that its services or products will ensure that the customer is in compliance with any law.
Notices and Disclaimers (con’t)
Information concerning non-IBM products was obtained from the suppliers of those products, their published
announcements or other publicly available sources. IBM has not tested those products in connection with this
publication and cannot confirm the accuracy of performance, compatibility or any other claims related to non-IBM
products. Questions on the capabilities of non-IBM products should be addressed to the suppliers of those products.
IBM does not warrant the quality of any third-party products, or the ability of any such third-party products to
interoperate with IBM’s products. IBM EXPRESSLY DISCLAIMS ALL WARRANTIES, EXPRESSED OR IMPLIED,
INCLUDING BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
PARTICULAR PURPOSE.
The provision of the information contained herein is not intended to, and does not, grant any right or license under any
IBM patents, copyrights, trademarks or other intellectual property right.
• IBM, the IBM logo, ibm.com, Bluemix, Blueworks Live, CICS, Clearcase, DOORS®, Enterprise Document
Management System™, Global Business Services ®, Global Technology Services ®, Information on Demand,
ILOG, Maximo®, MQIntegrator®, MQSeries®, Netcool®, OMEGAMON, OpenPower, PureAnalytics™,
PureApplication®, pureCluster™, PureCoverage®, PureData®, PureExperience®, PureFlex®, pureQuery®,
pureScale®, PureSystems®, QRadar®, Rational®, Rhapsody®, SoDA, SPSS, StoredIQ, Tivoli®, Trusteer®,
urban{code}®, Watson, WebSphere®, Worklight®, X-Force® and System z® Z/OS, are trademarks of
International Business Machines Corporation, registered in many jurisdictions worldwide. Other product and
service names might be trademarks of IBM or other companies. A current list of IBM trademarks is available on
the Web at "Copyright and trademark information" at: www.ibm.com/legal/copytrade.shtml.
Thank You
Your Feedback is
Important!
Access the InterConnect 2015
Conference CONNECT Attendee
Portal to complete your session
surveys from your smartphone,
laptop or conference kiosk.

More Related Content

What's hot

What's hot (20)

IBM Integration Bus & WebSphere MQ - High Availability & Disaster Recovery
IBM Integration Bus & WebSphere MQ - High Availability & Disaster RecoveryIBM Integration Bus & WebSphere MQ - High Availability & Disaster Recovery
IBM Integration Bus & WebSphere MQ - High Availability & Disaster Recovery
 
Kafka with IBM Event Streams - Technical Presentation
Kafka with IBM Event Streams - Technical PresentationKafka with IBM Event Streams - Technical Presentation
Kafka with IBM Event Streams - Technical Presentation
 
Getting started with MQTT - Virtual IoT Meetup presentation
Getting started with MQTT - Virtual IoT Meetup presentationGetting started with MQTT - Virtual IoT Meetup presentation
Getting started with MQTT - Virtual IoT Meetup presentation
 
Introduction to AMQP Messaging with RabbitMQ
Introduction to AMQP Messaging with RabbitMQIntroduction to AMQP Messaging with RabbitMQ
Introduction to AMQP Messaging with RabbitMQ
 
REST APIs and MQ
REST APIs and MQREST APIs and MQ
REST APIs and MQ
 
IBM MQ in Containers - Think 2018
IBM MQ in Containers - Think 2018IBM MQ in Containers - Think 2018
IBM MQ in Containers - Think 2018
 
IBM Integration Bus High Availability Overview
IBM Integration Bus High Availability OverviewIBM Integration Bus High Availability Overview
IBM Integration Bus High Availability Overview
 
IBM MQ Overview (IBM Message Queue)
IBM MQ Overview (IBM Message Queue)IBM MQ Overview (IBM Message Queue)
IBM MQ Overview (IBM Message Queue)
 
MQ Guide France - IBM MQ and Containers
MQ Guide France - IBM MQ and ContainersMQ Guide France - IBM MQ and Containers
MQ Guide France - IBM MQ and Containers
 
Building APIs with Mule and Spring Boot
Building APIs with Mule and Spring BootBuilding APIs with Mule and Spring Boot
Building APIs with Mule and Spring Boot
 
Principles of Monitoring Microservices
Principles of Monitoring MicroservicesPrinciples of Monitoring Microservices
Principles of Monitoring Microservices
 
IBM MQ V8 Security: Latest Features Deep-Dive
IBM MQ V8 Security: Latest Features Deep-DiveIBM MQ V8 Security: Latest Features Deep-Dive
IBM MQ V8 Security: Latest Features Deep-Dive
 
IBM WebSphere MQ: Managing Workloads, Scaling and Availability with MQ Clusters
IBM WebSphere MQ: Managing Workloads, Scaling and Availability with MQ ClustersIBM WebSphere MQ: Managing Workloads, Scaling and Availability with MQ Clusters
IBM WebSphere MQ: Managing Workloads, Scaling and Availability with MQ Clusters
 
[네이버오픈소스세미나] Pinpoint를 이용해서 서버리스 플랫폼 Apache Openwhisk 트레이싱하기 - 오승현
[네이버오픈소스세미나] Pinpoint를 이용해서 서버리스 플랫폼 Apache Openwhisk 트레이싱하기 - 오승현[네이버오픈소스세미나] Pinpoint를 이용해서 서버리스 플랫폼 Apache Openwhisk 트레이싱하기 - 오승현
[네이버오픈소스세미나] Pinpoint를 이용해서 서버리스 플랫폼 Apache Openwhisk 트레이싱하기 - 오승현
 
IBM Think 2018: IBM MQ High Availability
IBM Think 2018: IBM MQ High AvailabilityIBM Think 2018: IBM MQ High Availability
IBM Think 2018: IBM MQ High Availability
 
RabbitMQ & Kafka
RabbitMQ & KafkaRabbitMQ & Kafka
RabbitMQ & Kafka
 
Low Latency Mobile Messaging using MQTT
Low Latency Mobile Messaging using MQTTLow Latency Mobile Messaging using MQTT
Low Latency Mobile Messaging using MQTT
 
Nginx Reverse Proxy with Kafka.pptx
Nginx Reverse Proxy with Kafka.pptxNginx Reverse Proxy with Kafka.pptx
Nginx Reverse Proxy with Kafka.pptx
 
Websphere MQ (MQSeries) fundamentals
Websphere MQ (MQSeries) fundamentalsWebsphere MQ (MQSeries) fundamentals
Websphere MQ (MQSeries) fundamentals
 
IBM MQ vs Apache ActiveMQ
IBM MQ vs Apache ActiveMQIBM MQ vs Apache ActiveMQ
IBM MQ vs Apache ActiveMQ
 

Similar to IBM MQ - better application performance

Enable business continuity and high availability through active active techno...
Enable business continuity and high availability through active active techno...Enable business continuity and high availability through active active techno...
Enable business continuity and high availability through active active techno...
Qian Li Jin
 
Guidelhhghghine document final
Guidelhhghghine document finalGuidelhhghghine document final
Guidelhhghghine document final
nanirao686
 

Similar to IBM MQ - better application performance (20)

3450 - Writing and optimising applications for performance in a hybrid messag...
3450 - Writing and optimising applications for performance in a hybrid messag...3450 - Writing and optimising applications for performance in a hybrid messag...
3450 - Writing and optimising applications for performance in a hybrid messag...
 
IBM IMPACT 2014 - AMC-1882 Building a Scalable & Continuously Available IBM M...
IBM IMPACT 2014 - AMC-1882 Building a Scalable & Continuously Available IBM M...IBM IMPACT 2014 - AMC-1882 Building a Scalable & Continuously Available IBM M...
IBM IMPACT 2014 - AMC-1882 Building a Scalable & Continuously Available IBM M...
 
Hhm 3474 mq messaging technologies and support for high availability and acti...
Hhm 3474 mq messaging technologies and support for high availability and acti...Hhm 3474 mq messaging technologies and support for high availability and acti...
Hhm 3474 mq messaging technologies and support for high availability and acti...
 
Expanding your options with the MQ Appliance
Expanding your options with the MQ ApplianceExpanding your options with the MQ Appliance
Expanding your options with the MQ Appliance
 
Enable business continuity and high availability through active active techno...
Enable business continuity and high availability through active active techno...Enable business continuity and high availability through active active techno...
Enable business continuity and high availability through active active techno...
 
Tokyo AK Meetup Speedtest - Share.pdf
Tokyo AK Meetup Speedtest - Share.pdfTokyo AK Meetup Speedtest - Share.pdf
Tokyo AK Meetup Speedtest - Share.pdf
 
Expanding your options with the IBM MQ Appliance - IBM InterConnect 2016
Expanding your options with the IBM MQ Appliance - IBM InterConnect 2016Expanding your options with the IBM MQ Appliance - IBM InterConnect 2016
Expanding your options with the IBM MQ Appliance - IBM InterConnect 2016
 
IBM MQ High Availabillity and Disaster Recovery (2017 version)
IBM MQ High Availabillity and Disaster Recovery (2017 version)IBM MQ High Availabillity and Disaster Recovery (2017 version)
IBM MQ High Availabillity and Disaster Recovery (2017 version)
 
IBM MQ Appliance - Administration simplified
IBM MQ Appliance - Administration simplifiedIBM MQ Appliance - Administration simplified
IBM MQ Appliance - Administration simplified
 
AME-1934 : Enable Active-Active Messaging Technology to Extend Workload Balan...
AME-1934 : Enable Active-Active Messaging Technology to Extend Workload Balan...AME-1934 : Enable Active-Active Messaging Technology to Extend Workload Balan...
AME-1934 : Enable Active-Active Messaging Technology to Extend Workload Balan...
 
Semantic Validation: Enforcing Kafka Data Quality Through Schema-Driven Verif...
Semantic Validation: Enforcing Kafka Data Quality Through Schema-Driven Verif...Semantic Validation: Enforcing Kafka Data Quality Through Schema-Driven Verif...
Semantic Validation: Enforcing Kafka Data Quality Through Schema-Driven Verif...
 
What's new in IBM MQ Messaging
What's new in IBM MQ MessagingWhat's new in IBM MQ Messaging
What's new in IBM MQ Messaging
 
Architecting and Tuning IIB/eXtreme Scale for Maximum Performance and Reliabi...
Architecting and Tuning IIB/eXtreme Scale for Maximum Performance and Reliabi...Architecting and Tuning IIB/eXtreme Scale for Maximum Performance and Reliabi...
Architecting and Tuning IIB/eXtreme Scale for Maximum Performance and Reliabi...
 
IBM IMPACT 2014 AMC-1866 Introduction to IBM Messaging Capabilities
IBM IMPACT 2014 AMC-1866 Introduction to IBM Messaging CapabilitiesIBM IMPACT 2014 AMC-1866 Introduction to IBM Messaging Capabilities
IBM IMPACT 2014 AMC-1866 Introduction to IBM Messaging Capabilities
 
MQ Guide France - What's new in ibm mq 9.1.4
MQ Guide France - What's new in ibm mq 9.1.4MQ Guide France - What's new in ibm mq 9.1.4
MQ Guide France - What's new in ibm mq 9.1.4
 
Hpe service virtualization 3.8 what's new chicago adm
Hpe service virtualization 3.8 what's new chicago admHpe service virtualization 3.8 what's new chicago adm
Hpe service virtualization 3.8 what's new chicago adm
 
Ibm mq appliance slideshare
Ibm mq appliance slideshareIbm mq appliance slideshare
Ibm mq appliance slideshare
 
OnPrem Monitoring.pdf
OnPrem Monitoring.pdfOnPrem Monitoring.pdf
OnPrem Monitoring.pdf
 
Guidelhhghghine document final
Guidelhhghghine document finalGuidelhhghghine document final
Guidelhhghghine document final
 
Using Kubernetes to make cellular data plans cheaper for 50M users
Using Kubernetes to make cellular data plans cheaper for 50M usersUsing Kubernetes to make cellular data plans cheaper for 50M users
Using Kubernetes to make cellular data plans cheaper for 50M users
 

More from MarkTaylorIBM

More from MarkTaylorIBM (9)

IBM MQ V9 Overview
IBM MQ V9 OverviewIBM MQ V9 Overview
IBM MQ V9 Overview
 
IBM MQ - Monitoring and Managing Hybrid Messaging Environments
IBM MQ - Monitoring and Managing Hybrid Messaging EnvironmentsIBM MQ - Monitoring and Managing Hybrid Messaging Environments
IBM MQ - Monitoring and Managing Hybrid Messaging Environments
 
IBM MQ - Comparing Distributed and z/OS platforms
IBM MQ - Comparing Distributed and z/OS platformsIBM MQ - Comparing Distributed and z/OS platforms
IBM MQ - Comparing Distributed and z/OS platforms
 
MQ V8004 Summary
MQ V8004 SummaryMQ V8004 Summary
MQ V8004 Summary
 
MQ What's New Beyond V8 - V8003 level
MQ What's New Beyond V8 - V8003 levelMQ What's New Beyond V8 - V8003 level
MQ What's New Beyond V8 - V8003 level
 
MQ Security Overview
MQ Security OverviewMQ Security Overview
MQ Security Overview
 
IBM MQ - Comparing Distributed and z/OS platforms
IBM MQ - Comparing Distributed and z/OS platformsIBM MQ - Comparing Distributed and z/OS platforms
IBM MQ - Comparing Distributed and z/OS platforms
 
IBM MQ Disaster Recovery
IBM MQ Disaster RecoveryIBM MQ Disaster Recovery
IBM MQ Disaster Recovery
 
What's New in IBM MQ - Version 8
What's New in IBM MQ - Version 8What's New in IBM MQ - Version 8
What's New in IBM MQ - Version 8
 

Recently uploaded

+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
Health
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 

Recently uploaded (20)

VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdf
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
10 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 202410 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 2024
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students
 
How to Choose the Right Laravel Development Partner in New York City_compress...
How to Choose the Right Laravel Development Partner in New York City_compress...How to Choose the Right Laravel Development Partner in New York City_compress...
How to Choose the Right Laravel Development Partner in New York City_compress...
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfAzure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 

IBM MQ - better application performance

  • 1. © 2015 IBM Corporation 2279: IBM MQ Better Application Performance Mark Taylor marke_taylor@uk.ibm.com IBM Hursley
  • 2. Please Note IBM’s statements regarding its plans, directions, and intent are subject to change or withdrawal without notice at IBM’s sole discretion. Information regarding potential future products is intended to outline our general product direction and it should not be relied on in making a purchasing decision. The information mentioned regarding potential future products is not a commitment, promise, or legal obligation to deliver any material, code or functionality. Information about potential future products may not be incorporated into any contract. The development, release, and timing of any future features or functionality described for our products remains at our sole discretion. Performance is based on measurements and projections using standard IBM benchmarks in a controlled environment. The actual throughput or performance that any user will experience will vary depending upon many factors, including considerations such as the amount of multiprogramming in the user’s job stream, the I/O configuration, the storage configuration, and the workload processed. Therefore, no assurance can be given that an individual user will achieve results similar to those stated here.
  • 3. Agenda • Some performance numbers • Structure of the Queue Manager • Function Walkthroughs • Client Channels • Logging and Recovery
  • 4. Agenda • Some performance numbers • Structure of the Queue Manager • Function Walkthroughs • Client Channels • Logging and Recovery
  • 5. Performance Bottlenecks • Business Systems are complex ‒ Often no single bottleneck limiting performance ‒ Performance can mean different things to different people ‒ Throughput  Scalability  Low resource usage • Not only limited by physical resources ‒ Application design, such as parallelism can have major effect • Performance Reports (from SupportPac site) show range of scenarios RAM CPU NetworkI/O Bottlenecks
  • 6. See how far it's come …
  • 7. Distributed Performance: Persistent Messaging • An AIX system: Max performance increased from 16K to 19K
  • 8. Distributed Performance: Non-persistent Messaging • A Windows system: Max performance increased from 90K to 121K
  • 9. Distributed Performance in V8 • Improvements to distributed queue manager scaling ‒ Improve efficiency ‒ Better exploitation of wider SMP machines ‒ Looking at customer-provided application patterns not just benchmarks  Always happy to have more customer examples • Multiplexed client performance ‒ Increase the performance of multiplexed client channels (SHRCONV > 0) ‒ Especially for SHRCONV=1 • Other areas that helped: ‒ Cache alignment for internal structures ‒ Extended 64-bit exploitation for locking primitives ‒ RFH2 handling, particularly for waiting-getter  Fewer copies of data are needed ‒ Better compiler optimisations including feedback-directed optimisation ‒ Faster data conversion (especially for 1208)  Many messages are in 1208 codepage  Optimised handling when the queue manager needs to convert them
  • 10. Agenda • What is distributed WebSphere MQ? • Structure of the Queue Manager • Function Walkthroughs • Client Channels • Logging and Recovery
  • 12. Agent Queue Manager Shared Resources Checkpoint MQCONN MQCONN MQOPEN MQDISC MQPUT MQGET etc. Agent IPCC Execution Controller IPCC Log Manager MQI Stub Application IPCC MQI Stub Application IPCC MQI Stub Application IPCC Object Authority Manager Queue Manager: Process Model Shared, Isolated and Trusted Bindings
  • 13. Agenda • What is distributed WebSphere MQ? • Structure of the Queue Manager • Function Walkthroughs • Client Channels • Logging and Recovery
  • 14. MQI Stub Application IPCC Execution Controller IPCC IPCC DAP Kernel Agent IPCC Application (MQI Stub) Verify parameters and handles Construct a Connect message Call API crossing exit Send a message to the EC Application (MQI Stub) Receive the reply Construct an IPCC message Send the message to the agent Application (MQI Stub) Receive reply and call API crossing exit Return HCONN Execution Controller Choose an agent or start a new one Construct a reply IPCC message Return reply to application Agent Check App's permission to connect Allocate and assign agent resources Send IPCC reply back to application MQCONN
  • 15. Performance Implications: Connection Binding • Fastpath binding removes inter-process communications ‒ Implies that the application is 'trusted' ‒ MQCONNX option MQCNO_FASTPATH_BINDING ‒ Application failure can corrupt queue manager • Primary benefit is for non-persistent message processing ‒ Use for MCAs, Broker  - 30% CPU saving MQ Appl Agent Memory Log IPC Standard Binding MQ Appl Agent Memory Log FASTPATH Binding
  • 16. Performance Implications: Connection Binding MQ Appl Agent Memory Log IPC Standard Binding MQ Appl Agent Memory Log FASTPATH Binding MCA Agent Memory Log IPC Client Binding MQ Appl Network
  • 17. Application (MQI Stub) Verify hConn Call API crossing exit Verify parameter addressability Place parameters in an Open message Send an IPCC message to the agent MQI Stub Application IPCC DAP Kernel Agent IPCC Agent Application interface  Verify open parameters Kernel Verify operation validity Resolve target – including cluster lookup Check permissions on the queue DAP Load the queue ready for gets and puts if required ƒThis is the part that can use system resources Kernel Generate handle to object for application Generate responses and event messages IPCC Send reply back to application Application (MQI Stub) Receive reply Call API crossing exit Return HOBJ MQOPEN of a queue
  • 18. MQOPEN internal changes for V8 • The object catalog is the list of objects and a map to the real files ‒ Shows that queue 'X.Y' is stored in "/var/mqm/qmgrs/<qm>/queues/X!Y" ‒ dspmqfls command shows the map ‒ Updated whenever an object is created or deleted • In MQ V7 there were just two locks associated with the object catalog ‒ A significant implication of this scheme was that an MQOPEN could not overlap with the creation/deletion of a queue (or any other object) ‒ Ghost queues introduced in MQ V5.2 went some way to reducing the impact, particularly for TDQ’s, but very significant serialization implications remained. • MQ V8 uses finer grained locks ‒ The master mutex need not be owned while waiting for the object mutex. • The most significant impact of this serialization change is that dynamic queues can now be created and destroyed concurrently with MQOPEN activity 27
  • 19. Performance Implications: Heavyweight MQI Calls • MQCONN is a “heavy” operation ‒ Don’t let your application do lots of them ‒ Wrappers and OO interfaces can sometimes hide what’s really happening ‒ Lots of MQCONNs can drop throughput from 1000s Msgs/Sec to 10s Msgs/Sec • MQOPEN is also ‘heavy’ compared to MQPUT/MQGET ‒ Depends on the type of queue and whether first use  Loading pre-existing queue; creating dynamic queue ‒ It’s where we do the security check  Try to cache queue handles if more than one message ‒ If you’re only putting one message consider using MQPUT1  Particularly client bindings • Try to avoid exclusive access to the Queue ‒ Makes it harder to scale the solution  For example adding more instances of application ‒ Implies that reliance on message order is not required  Partition the data to allow parallel processing?
  • 20. 01 00 00 01 01 01 01 11 11 11 11 11 11 00 00 00 00 01 01 01 00 00 00 00 00 11 11 11 11 11 10 10 10 10 10 10 10 10 10 10 01 00 00 01 01 01 01 11 11 11 11 11 11 00 00 00 00 01 01 01 00 00 00 00 00 11 11 11 11 11 10 10 10 10 10 10 10 10 10 10 Space Map 01 00 00 01 01 01 01 11 11 11 11 11 11 00 00 00 00 01 01 01 00 00 00 00 00 11 11 11 11 11 10 10 10 10 10 10 10 10 10 10 Non- persistent Message Detail Cache Queue file Log Message Chain(s) Space Hdl File System Buffer Overflow Persistent Queue Buffer NP Queue Buffer Overflow Persistent In the Depths of a Queue
  • 21. Tuning Queue Buffers • Increasing buffers can improve performance ‒ More information can be kept in memory, without flushing to disk ‒ Costs more memory per modified queue • But no documented external mechanism to do it ‒ Performance supportpacs indicate how to do it ‒ DefaultQBufferSize / DefaultPQBufferSize ‒ SupportPac MS0P (Cat2 – ie “as-is”) includes “QTune” program c:> java -jar qtune.jar -d c:mqmqmgrsQMAqueuesSYSTEM!DEFAULT!LOCAL!QUEUE File c:mqmqmgrsQMAqueuesSYSTEM!DEFAULT!LOCAL!QUEUEq Stored npBuff = 64 kB Stored pBuff = QMgr default Stored maxQSize = 2,097,151 MB
  • 22. Performance Implications: Persistence • Log bandwidth is going to restrict throughput ‒ Put the log files on the fastest disks you have, separate from queue file ‒ Persistent messages are the main things requiring recovery after an outage ‒ Can significantly affect restart times • Why use persistence? ‒ False assumption that persistence is for "important" data and nonpersistent for when you don't care ‒ The real reason for persistent messages is to reduce application complexity ‒ With persistent, apps do not need logic to detect and deal with lost messages ‒ If your app (or operational procedures) can detect and deal with lost messages, then you do not need to use persistent messages • Understand which apps use persistence MQPUT Queue File Log
  • 23. Kernel Verify operation validity (Resolve cluster queue destination) DAP Reserve space for the message data If (persistent message) Write log records for the update (Wait for log records to reach the disk if outside syncpoint) Write the message to the queue file Else (non-persistent) If (space available in queue buffer) Copy the message data into the buffer Else Write the message to the queue file without logging Maintain queue statistics such as queue depth Kernel Generate responses and events, wakeup getters/drive async consumers Serialised MQPUT Walkthrough Also check for "if waiting getter" Tip! Use persistent messages with syncpoint
  • 24. Put to a waiting getter • MQPUT most efficient if there is getting application waiting ‒ Having multiple applications processing queue increases percentage ‒ May not appear ‘balanced’ – May keep one ‘hot’ • Only for out of syncpoint messages ‒ Both persistent and non-persistent ‒ If Persistent outside of syncpoint, think carefully about why using persistence  Got message could be lost if crash before returning to the application! • No queuing required ‒ Removes a lot of processing of placing the message onto the queue • Significantly reduces CPU cost and improves throughput ‒ Lots of improvements on this area in newest releases (7.1, 7.5) MQPUT MQGET MQGET MQGET
  • 25. Kernel Verify operation validity Check message expiry Wait for message if not available DAP Locate a message meeting the requested criteria including current browse cursor position priority message id, correlation id, segment or group conditions Copy data into the message buffer If (persistent) Write log record (Wait for log record to reach the disk if outside syncpoint) Move the browse cursor if required Maintain queue statistics such as queue depth Kernel Generate responses and events Serialised MQGET Walkthrough Tip! In request reply model, get by correlid more efficient than get by msgid
  • 26. Kernel Verify operation validity DAP Write log record to end transaction Wait for this log record to reach the disk Lock all queues touched in this transaction For each queue Make any changes to messages in the transaction visible Unlock queue Kernel Generate responses and events Wakeup Getters/Drive Async Consumers MQCMIT Walkthrough Deal with 2PC protocol if in an XA transaction
  • 27. Performance Implications: Syncpoint • Do you need it? ‒ Yes, when a set of work needs to either all be performed, or all not performed • Maximum Size of UOW can be limited ‒ QMGR MAXUMSGS parm ‒ Set to sensible value to avoid runaway applications • Make sure you keep the size of your UOWs small ‒ Don’t forget to end the UOW • Cheaper to process in syncpoint for persistent messages ‒ Up to a point, not huge UOWs ‒ Log not forced after every MQPUT/MQGET • Useful even when only a single message inside syncpoint ‒ And running multiple parallel applications
  • 28. Good Application Design - Summary • Long-running connection • Opens queues up-front • Uses syncpoint for persistent operations • No message affinities so multiple instances can run in parallel
  • 29. Publish/Subscribe Implementation from V7 • MQOPEN, MQPUT, MQGET very similar to point-to-point ‒ Includes cluster resolution ‒ Need to find closest admin topic node ‒ Internal subscribers may forward publication to another queue manager • Durable Subscriptions held on SYSTEM.DURABLE.SUBSCRIBER.QUEUE ‒ Multiple subscriptions consolidated into single message ‒ Why is there no non-durable subscriber queue? ‒ Retained publications also stored on a queue • Handling application abend ‒ V6 cleanup for non-durable subs was “automatic” for JMS, manual otherwise ‒ Automatic for V7+ • Managed destinations ‒ Agent creates queue in MQSUB - trace shows internal MQOPEN (kqiOpenModel) • Parallel match-space access via shared memory set ‒ Several applications can publish simultaneously on the same topic ‒ Lock held during subscribe/unsubscribe processing
  • 30. Message Processing • Persistent pubs switch to non-persistent-ish for non-durable subscriptions ‒ Does not change the reliability level ‒ Messages are not logged, but they keep the “persistent” flag ‒ Improves performance • Properties stored as part of the message ‒ Logged for persistence, rcdmqimg etc ‒ Written to disk in either RFH2 or an “internal” format ‒ Converted to application-required format during MQGET • Selectors on queues can cause all messages to be browsed ‒ Queue lock may be held during selection
  • 31. Agenda • What is distributed WebSphere MQ? • Structure of the Queue Manager • Function Walkthroughs • Client Channels • Logging and Recovery • Multiple Installation Support
  • 32. Clients from V7 • Many changes to the client protocols in V7 ‒ All can improve performance • Multiplexing or Shared Conversations ‒ For multi-threaded applications ‒ Several connections use the same socket • Asynchronous Put ‒ For sending applications • Read-ahead ‒ For receiving applications • New threads inside application for full-duplex comms ‒ Sharecnv(0) – May be fast but no full-duplex so miss good functionality ‒ Sharecnv(1) – One socket per hconn, optimised in V8 - recommended value ‒ Sharecvn(10) – Shared socket for multiple conversations (default value)
  • 35. Client Connection Performance. • Lots of internal changes at V8 ‒ Channel status table restructure ‒ Reduce cost of health checking (MQIBindType=FASTPATH) ‒ Keep a hash table of processes, each with a sub-list of threads. ‒ Reduce cost of creating/deleting TDQ’s ‒ Channel process pooling pre-start • Net effect of all of these changes is significant improvement to the queue manager’s ability to accept a large number of inbound connections in a relatively short time. • In one test the time taken to attach 50,000 clients, with each client owning a TDQ, reduced from over an hour at 7.0.1.6 to under 4 minutes at MQ V8. 59
  • 36. Agenda • What is distributed WebSphere MQ? • Structure of the Queue Manager • Function Walkthroughs • Channels • Logging and Recovery • Multiple Installation Support
  • 37. What's the point of logging? • A log record is written for each persistent update ‒ The log record describes the update • Optimisations to minimise serialisation points • Write-Ahead Logging ‒ The log is always more up-to-date than the actual data • Log is a sequential file ‒ Sequential I/O is much quicker than random ‒ Single point of writing rather than to individual object files • Log and actual data are reconciled during strmqm ‒ Progress information displayed • Point of consistency – Checkpoint ‒ Log control file: amqhlctl.lfh – in log directory ‒ Checkpoint amqalchk.fil – qmgr directory ‒ Backup queue managers from MQ V6 Myth! Triple write integrity does not mean we write all data 3 times!
  • 38. Looking at logger performance • Can extract internal information from a service tool ‒ Lots of MQ performance PMRs turn out to be disk-related. So recording was added to the internal state  amqldmpa –c H –m <qmgr> -d 8 –n <count> -s <interval> -f <file> ‒ The amqldmpa program can dump lots of other internal information too • Includes logger I/O activity ‒ WriteTimeMax shows maximum time (microseconds) to complete I/O ‒ WriteSizeMax shows largest (bytes) I/O ‒ Since qmgr started • Maintains averages ‒ WriteSizeShort is short-term (64-sample) weighted average of recent writes ‒ WriteSizeLong is longer-term (1024-sample) weighted average ‒ Similarly for WriteTimeShort/Long • From one PMR: ‒ WriteTimeMax = 59102377, WriteSizeMax=2097152 ‒ So it has taken nearly 60 seconds to write 2MB ‒ Implies they need to talk to disk support team!
  • 39. Summary – understand the applications • Understand the application pattern ‒ Exclusivity, affinity • Understand the individual application ‒ Many times have heard "it's using persistence" when it's not. Or vice versa. • If you don't have access to application source, tools exist to help ‒ Application Activity Reports ‒ MQ Trace
  • 40. Notices and Disclaimers Copyright © 2015 by International Business Machines Corporation (IBM). No part of this document may be reproduced or transmitted in any form without written permission from IBM. U.S. Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM. Information in these presentations (including information relating to products that have not yet been announced by IBM) has been reviewed for accuracy as of the date of initial publication and could include unintentional technical or typographical errors. IBM shall have no responsibility to update this information. THIS DOCUMENT IS DISTRIBUTED "AS IS" WITHOUT ANY WARRANTY, EITHER EXPRESS OR IMPLIED. IN NO EVENT SHALL IBM BE LIABLE FOR ANY DAMAGE ARISING FROM THE USE OF THIS INFORMATION, INCLUDING BUT NOT LIMITED TO, LOSS OF DATA, BUSINESS INTERRUPTION, LOSS OF PROFIT OR LOSS OF OPPORTUNITY. IBM products and services are warranted according to the terms and conditions of the agreements under which they are provided. Any statements regarding IBM's future direction, intent or product plans are subject to change or withdrawal without notice. Performance data contained herein was generally obtained in a controlled, isolated environments. Customer examples are presented as illustrations of how those customers have used IBM products and the results they may have achieved. Actual performance, cost, savings or other results in other operating environments may vary. References in this document to IBM products, programs, or services does not imply that IBM intends to make such products, programs or services available in all countries in which IBM operates or does business. Workshops, sessions and associated materials may have been prepared by independent session speakers, and do not necessarily reflect the views of IBM. All materials and discussions are provided for informational purposes only, and are neither intended to, nor shall constitute legal or other guidance or advice to any individual participant or their specific situation. It is the customer’s responsibility to insure its own compliance with legal requirements and to obtain advice of competent legal counsel as to the identification and interpretation of any relevant laws and regulatory requirements that may affect the customer’s business and any actions the customer may need to take to comply with such laws. IBM does not provide legal advice or represent or warrant that its services or products will ensure that the customer is in compliance with any law.
  • 41. Notices and Disclaimers (con’t) Information concerning non-IBM products was obtained from the suppliers of those products, their published announcements or other publicly available sources. IBM has not tested those products in connection with this publication and cannot confirm the accuracy of performance, compatibility or any other claims related to non-IBM products. Questions on the capabilities of non-IBM products should be addressed to the suppliers of those products. IBM does not warrant the quality of any third-party products, or the ability of any such third-party products to interoperate with IBM’s products. IBM EXPRESSLY DISCLAIMS ALL WARRANTIES, EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. The provision of the information contained herein is not intended to, and does not, grant any right or license under any IBM patents, copyrights, trademarks or other intellectual property right. • IBM, the IBM logo, ibm.com, Bluemix, Blueworks Live, CICS, Clearcase, DOORS®, Enterprise Document Management System™, Global Business Services ®, Global Technology Services ®, Information on Demand, ILOG, Maximo®, MQIntegrator®, MQSeries®, Netcool®, OMEGAMON, OpenPower, PureAnalytics™, PureApplication®, pureCluster™, PureCoverage®, PureData®, PureExperience®, PureFlex®, pureQuery®, pureScale®, PureSystems®, QRadar®, Rational®, Rhapsody®, SoDA, SPSS, StoredIQ, Tivoli®, Trusteer®, urban{code}®, Watson, WebSphere®, Worklight®, X-Force® and System z® Z/OS, are trademarks of International Business Machines Corporation, registered in many jurisdictions worldwide. Other product and service names might be trademarks of IBM or other companies. A current list of IBM trademarks is available on the Web at "Copyright and trademark information" at: www.ibm.com/legal/copytrade.shtml.
  • 42. Thank You Your Feedback is Important! Access the InterConnect 2015 Conference CONNECT Attendee Portal to complete your session surveys from your smartphone, laptop or conference kiosk.