Sunday, October 10, 2010

MQ

)
What are MQ Tuning Parameters?

2) How to enable auto-definition of channel definitions

3) How to remove a QM from a cluster

4) What exactly happens when you issue SUSPEND QM

5) What exactly happens when you add a QM to cluster

6) How do you identify MQ active logs

7) What do you do when channel goes to RETRY

8) Why does a channel go to RETRY state

9) How do you configure SSL for MQ

10) Location of log directories

11) How to take MQ backup

12) How is recovery different in circular logging and linear logging

13) How to identify, how many logs are required for QM archiving

14) What is MQ Syncpoint

15) What is MQ checkpoint

16) What is Kernel tuning for MQ installation

17) How to check if you need to commit or rollback a transaction from sequence
nos available in channel status

18) How many types of logs are available in MQ

19) How to find the transactions within the UoW

20 ) How many minimum sender-rcvr chnls r reqd for 4 QMs in cluster

21 ) How to define QM Alias

22) What are Remote events (Not Auth EV, Q Full, Q Srvc Int Ev, Bridge Started
Ev,

Unknown xmit Q Ev)

Outstanding UoW (Show EOW, DSPMQTRN, RSVMQTRN, DSPMQTRC, RCDMQINQ)

checkpoint information (AMQHLCTL.lfh, AMQCHLCL.tab, AMQALCHK.fil,

AMQERR01.log, AMQERROR02.log)
2) How to enable auto-definition of channel
definitions
A QM can be configured to automatically create channel objects in response
to MCA connection request

Channel auto definition is enabled for a QM by configuring the CHAD attribute
of QM to ENABLED

CHAD(ENABLED)



3) How to remove a QM from a cluster
1.If the QM you are removing is a repository QM then join a new QM to the
cluster before removing existing full repository QM

2.Set the repository(REPOS) attribute of the QM to blank

Use ALTER QMGR REPOS(' ')

3.Use SUSPEND QMGR CLUSTER command in mqsc to suspend the QM in the cluster
4.Inform the QMs in cluster that the QM is leaving the cluster.So,

Set the cluster attribute of that cluster receiver channel object to blank.

ALTER CHANNEL('To.QM) CHLTYPE(CLUSRCVR) CLUSTER(' ')

5.Issue stop channel command for cluster receiver channel

STOP CHANNEL('To.QM')

6.Issue a refresh cluster command against the QM for the cluster that the QM is
leaving.This ensures that the information about the cluster is cleared from

from repository held by the QM



4) What exactly happens when you issue SUSPEND QM
Suspending a QM is not the same as removing it from the cluster.

The QM will be still in the machine in running state and you can put and get
nessages.

'Suspend QM' tells the workload management routines to avoid sending messages
to it.

And its an Advice to other queue managers in the cluster to avoid sending
messages to the suspended qm.

THis is useful before performing planned mainatenance on the QM to recommend to
applications that they do not route messages when it is unavailable.



5) What exactly happens when you add a QM to cluster
The QM will become the member of the cluster and can share queue objects
within cluster by using cluster(CLUSTER)

or cluster namelist (CLUSNL)attributes.Existing queue objects can be altered
and new ones can be defined.

THis QM will have the knowledge of the resources hosted within the cluster
without explicit local definition for those resources.
What do you do when channel goes to RETRY
channel automatically retries the connection at regular intervals.The behaviour is defined using short retry intervel(SHORTTMR),long retry intervel(LONGTMR),

short retry count(SHORTRTY) and Long retry count(LONGRTY) attributes of channel
object.

AFter the number of configured retry attempts have been performed,the channel
enters

STOPPED status automatically.THen the user has to issue START comand to start
the channel manually.



8) Why does a channel go to RETRY state
If an attempt to start the channel has failed then the channel will goto
retry state

eg: Listener not running in the receiver side

wrong ip address is specified in sdr channel definition

Wrong port address of the listener is mentioned in sdr chl definition



10) Location of log directories
In unix,

if mq is the place where MQ is installed then log files will be in

System error logs will be in : mq/var/mqm/errors

QM error log directories (eg: for queue manager QM1):
mq/var/mqm/qmgrs/QM1/errors



11) How to take MQ backup
Backing up of QM data:

End the queuemanager and take the copies of all the QM data and logfile
directories(especially log control file and configuration file)

in some other machine for backup

Using backup Qmgr:

An existing queue manager can have a dedicated backup queue manager. A backup
queue manager is an inactive copy of the existing queue manager.

If the existing queue manager becomes unrecoverable due to severe hardware
failure, the backup queue manager

can be brought online to replace the unrecoverable queue manager
)
What is MQ checkpoint
While
storing the MQ logs,for easy back-up, checkpoints are used.For example while
logging contents,after 10 transactions get completed a

checkpoint is issued.We can retrive the stored information from the checkpoint
in case of recovery.

A checkpoint is a point in time when the record described in the log is same as
record in queue.Checkpoint itself consists of series of log records

needed to restart QM.for eg: the state of all transactions active at the time
of checkpoint.

chkpoint record represents the most recent point of consistency between log and
data.



17) How to check if you need to commit or rollback a transaction from sequence
nos available in channel status
Both sender and rcvr MCAs maintain sequence number related to number of
messages successfully transferred over the channel.

If we are sending the messages in batches of 50,if the msg seq no is 50,then
need to commit the uow else roll back

If all the 50 messages in batch has succefully send through channels and
received by the receiving QM then the work should be commited.



18) How many types of logs are available
in MQ
two..ACtive and archive logs

WebSphere MQ directly uses active logs to log WebSphere MQ changes. When these
logs become full, they are copied to archive logs.

The archive logs can be on tape or on disk. The archive logs are typically
created as disk GDG data sets.

There are two types of logging methods circular and linear.



20 ) How many minimum sender-rcvr chnls r reqd for 4 QMs in cluster
Two QM's can act as full repos usually.so they should be tightly coupled.

so all the 4 QMs should have rcv channel with their own ip address

all the QM should have sdr channel with repos QM's ip address so totally 4 sdr
and 4 rcvr should be defined.



21 ) How to define QM Alias
In the remote queue definition,remote name(RNAME),attribute of remote queue
object should be left blank.DEFINE QREMOTE('qm1.alias') RNAME(' ')
RQMNAME('qm1')
22)
What are Remote events (Not Auth EV, Q Full, Q Srvc Int Ev, Bridge Started Ev,

Unknown xmit Q Ev)
Remote
event indicates that an application cannot access a queue on another(remote)
QM.

Like TX to be used is not properly defined.

other examples:

unknown TX queue,TX queue usage error,unknown default TX queue,unknown remote
QM
IPPROCS
- will tell you how many threads are reading the msgs from that queue.

OPPROCS - will tell you how many threads are writing the msgs onto that queue.
XMITQ are used for
holding the msgs in sender side until your communication channel is up and
running..



Initiation Q is just like a local queue where yu need this one to monitor by
trigger monitor to initiate the process....
Write
the image of an object or group of objects to the log for media recovery.

This is used to record the image of particular mq objects



rcrmqobj - recreate object
Recreate
an object, or group of objects, from their images contained in the log

THis command is used to recreate the mq objects which are already
recorded(using rcdmqimg)



Use the rcdmqimg command
to write an image of an object, or group of
objects, to the log for use in media recovery.Use the associated command
rcrmqobj to recreate the object from the image.Both are assosiated with each
other.



Thiscommand records an image of the queue manager object QM1 in the log.
rcdmqimg -t qmgr -m QM1



This command re-creates all local queues
for the same qmgr QM1:
rcrmqobj -m QM1 -t ql *



Use the rcdmqimg command to write an image of an object, or group of objects,
to the log for use in media recovery.Use the associated command rcrmqobj to
recreate the object from the image
CIRCULAR LOGGING AND
LINEAR LOGGING .



we can define it while creating queue manager .



-ll and --lc are the options to define logging methods .



Circular logging stores the log in a ring manner. When all the files are full
it goes back to first file in the ring and starts again. Hence during recovery,
any freed files prior to checkpoint can be reused. The primary log files might
eligible for reuse after filling the current file.



Linear logging keeps log data in a continuous sequence of files. Space is not
reused, so you can always retrieve any record logged in any log extent that has
not been deleted. During recovery, the freed log files are no longer accessed
and become inactive.
Circular
logging:
Overwrite process (Restart Recovery)--Old log files
will be overwrited.



Linear logging: Append Process(Media
Recovery)--
Old log files will auto-archived. Log formatter
"amqharmx" is the process which will take care of this one.
amqharmx this process
is of log formatter, used only if the queue manager has linear logging selected
calls: API calls in brief
MQI calls:


There are 13 API calls used in programming of MQ

The MQI comprises od

Calls - through which programs can access the queue manager and its facilities.

Structures - that programs use to pass data to and from the queue manager.

Elementary data types - for passing data to and from the queue manager.

---------------------------

Classification of MQI calls based on the purpose.

queuemanager:

MQCONN - connect to a qmgr

MQCONNX - Conect to qmgr using connection option

MQSIDC - Disconnect from the qmgr

----------------

Queue:

MQOPEN - open a mqseries object

MQPUT - Place a message on a queue

MQOUT1 - Put a single message on a queue(It will open,put and close the
queue.No need of sepearte mqopen and mqclose calls)

MQGET - Retrive a message from the queue

MQCLOSE - Close an MQseries object

Note: SIngle MQPUT/MQFET will put /retrive a single message only

-----------------------------

Attributes:

MQINQ - Inquire about attributes of MQseries object(similar to display function
used in runmqsc command.eg: display ql(Q1) curdepth)

MQSET - set some specific queue attributes(SImilar to define/alter attribute in
runmqsc command)

-------------------------------------

Transaction:

MQBEGIN - Begins the unit of work cordinated by qmgr

MQCMIT - Notify syncpoint for all PUTs and GETs since last syncpoint

MQBACK - Backout notiification for all PUTs and GETs since last syncpoint
Tuning
parameters
logging
also plays an important role in tuning MQ performance
Performance
will be affected by

Message throughput:
The
number of messages or message bytes that can be pumped through a messaging
system per second.

Latency :
The time it takes a particular message to be delivered from message
producer to message consumer.

Stability:
The overall availability of the message service or how gracefully it
degrades in cases of heavy load or failure.


Efficiency:
The efficiency of message delivery; a measure of message throughput in
relation to the computing resources employed.



SO we should take care of some attributes to tune MQ without affecting its
performance.



Message limits for queues (MAXDEPTH)
In a high-volume replication environment, you must pay particular attention
to the number of messages that each queue is set up to hold. This number is set
by the MAXDEPTH parameter.



Channel parameters
You can tune the channel batch size and interval to improve performance.



Maximum uncommitted messages (MAXUMSGS)
The replication and event publishing programs put and get messages from
queues within a synchpoint, so the MAXUMSGS parameter might be a factor in your
WebSphere MQ tuning. MAXUMSGS is a queue manager parameter that limits the
number of messages that can be put on queues or retrieved from queues within a
synchpoint.



Message size affects performance because
more data must be passed from producing client to consuming client, and because
for persistent messages a larger message must be stored.



Message type(persistent and non persistent)
Persistent messages took more disc space.



DLQ
defining dead letter queue for all queuemanager,to avoid stagnation of
messages in queues for long time
Reasons
for 2033

There
are no messages on the queue.

•The unit of work (UOW) for the MQPUT was not committed.

•The messages have expired.



Chk qmgr(if ur qmgr is QM1) log files in

mq/var/mqm/qmgrs/QM1/errors

system logs will be in:

mq/var/mqm/errors

No comments:

Post a Comment