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 » General IBM MQ Support » Circular logging logic

Post new topic  Reply to topic
 Circular logging logic « View previous topic :: View next topic » 
Author Message
oware
PostPosted: Thu Sep 23, 2004 11:53 am    Post subject: Circular logging logic Reply with quote

Novice

Joined: 28 Jan 2002
Posts: 23

Hi all,

I want to understand how MQ circular loggin actually works.
Say I have configured the queue manager to have circular logging with 40 primary log files and 8 secondary log files. The messages are put into the Queue and read from the Queue throughout the day. Now i know that MQ stores the messages into the log file and at some point reuse the same space used by other messages once those messages are read out of the queue.

My questions is will the MQ first create the log files one by one till it reaches 40 and only then it will go to the first created log file and look for free space and allocate that to the new message or does it look for the free space even before the log file number reaches to 40?


Thanks in advance!!

oware
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
Mallik
PostPosted: Thu Sep 23, 2004 12:12 pm    Post subject: Reply with quote

Acolyte

Joined: 29 Feb 2004
Posts: 53

All the primary log files are created with the QMGR creation allocating the space as specified with the crtmqm script. Secondary ones are created only when all the Primary one's are full & there is no free space to release.

My understanding is all the primary logs are touched (QMGR writes something) even before the 1st log gets full. any comments?
Back to top
View user's profile Send private message
oware
PostPosted: Thu Sep 23, 2004 1:27 pm    Post subject: Reply with quote

Novice

Joined: 28 Jan 2002
Posts: 23

Thanks Mallik for your reply.

I want to know how the MQ logs the messages into the log files. Does it keeps on filling the log files till it reaches 40 and then start over with the first log file created and looks for the free space (which was creatded after the message was read off the queue) to log the other incoming messages or it doesn't wait for all the logs to get filled and just fills the free space whenever it is available.

oware
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
fjb_saper
PostPosted: Thu Sep 23, 2004 4:52 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

For circular logging I keep the actively used space at a minimum:
primary files 3
Secondary files 50 or anything between 2 ans 59 ..

Now as for usage the qmgr goes through the files in a circular order.
First file S00000.LOG gets filled, then S00001.LOG then S00002.LOG

Now the qmgr is checking whether there are still any uncommitted transactions in file S00000.LOG. If that is the case the qmgr will start on the secondaries. If not it will go on with S00000.LOG again.
After each secondary is full the same check is done. Once S00000.LOG is no longer used the qmgr will stop with the secondaries and go back to the primary sequence.

The secondaries are then deleted as they are released from active logs.

This behavior is from observation...
Enjoy
Back to top
View user's profile Send private message Send e-mail
oware
PostPosted: Fri Sep 24, 2004 10:04 am    Post subject: Reply with quote

Novice

Joined: 28 Jan 2002
Posts: 23

Thanks fjb_saber for your reply.

Actually we wanted to know how many messages are coming to the queue. But once the messages are read off the queue there is no way to know if we actually received that msg. The only one way we figured out was check the MQ transaction log file and check for that particular msg. But for that it was very important that the message logs are not overwritten in the log files. So even though the msg volume is not very high we increased the primary log to 40. In that way we can get the checklist of the all messages that came that day and we take backup of the log files daily. So next day even if the log is overwritten by new incoming msg. we are not concern.

We increased the number of logs from 10 to 40 but can see only 20 log files. Hence i wanted to understand of MQ transaction circular logging.

Any ideas are welcomed

Thanks

oware
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
Mallik
PostPosted: Fri Sep 24, 2004 12:18 pm    Post subject: Reply with quote

Acolyte

Joined: 29 Feb 2004
Posts: 53

Quote:
We increased the number of logs from 10 to 40 but can see only 20 log files.


Did you recreate the QMGR with crtmqm ..... -lp 40 -ls xx? If not, the only way you can change the number of log files is by recreating the QMGR with the required lp & ls values.
Back to top
View user's profile Send private message
siliconfish
PostPosted: Fri Sep 24, 2004 2:32 pm    Post subject: Reply with quote

Master

Joined: 12 Aug 2002
Posts: 203
Location: USA

Mallik -- You need not recreate the queue manager to increase the number of logs, u just need to recycle the queue manager to bring the change into affect.
Back to top
View user's profile Send private message
Mallik
PostPosted: Fri Sep 24, 2004 4:27 pm    Post subject: Reply with quote

Acolyte

Joined: 29 Feb 2004
Posts: 53

My bad. Thanks for correcting me siliconfish.

I did a quick test by changing the number in qm.ini & recycled the qmgr. But the changed value (primary files in qm.ini) didn't refelect in the log files count(in /var/mqm/log/qmgr/active) even after recycling the QMGR. My previous post was based on this test(I should have referred the manual).

From manual:
Quote:

1. You can change the number of primary and secondary log files each time the
queue manager starts.
2. You cannot change the log file size; you must determine it before creating the
queue manager.
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 » General IBM MQ Support » Circular logging logic
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.