Author |
Message
|
oware |
Posted: Thu Sep 23, 2004 11:53 am Post subject: Circular logging logic |
|
|
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 |
|
 |
Mallik |
Posted: Thu Sep 23, 2004 12:12 pm Post subject: |
|
|
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 |
|
 |
oware |
Posted: Thu Sep 23, 2004 1:27 pm Post subject: |
|
|
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 |
|
 |
fjb_saper |
Posted: Thu Sep 23, 2004 4:52 pm Post subject: |
|
|
 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 |
|
 |
oware |
Posted: Fri Sep 24, 2004 10:04 am Post subject: |
|
|
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 |
|
 |
Mallik |
Posted: Fri Sep 24, 2004 12:18 pm Post subject: |
|
|
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 |
|
 |
siliconfish |
Posted: Fri Sep 24, 2004 2:32 pm Post subject: |
|
|
 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 |
|
 |
Mallik |
Posted: Fri Sep 24, 2004 4:27 pm Post subject: |
|
|
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 |
|
 |
|