|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Reducing the number of log files |
« View previous topic :: View next topic » |
Author |
Message
|
2189 |
Posted: Thu Jan 13, 2005 4:43 am Post subject: Reducing the number of log files |
|
|
Apprentice
Joined: 22 Oct 2002 Posts: 31
|
Is it possible to reduce the number of log files a qmgr is using?
Due to an administration error a qm.ini was overwritten which had higher value for the number of primary logs and some extra logs were then created. We now want to set the number of logs back to 3 but have 13 log files.
- Can we just change the qm.ini back to 3 and recycle the qmgr?
- What if more than 3 of the log files are active?
- Is there a way of seeing which logs are active?
- After recycling the qmgr, how would we know which logs are active and which we can delete?
Any advice would be appreciated.
Gareth _________________ 2189 errors make me  |
|
Back to top |
|
 |
Nigelg |
Posted: Thu Jan 13, 2005 5:26 am Post subject: |
|
|
Grand Master
Joined: 02 Aug 2004 Posts: 1046
|
Quote: |
Can we just change the qm.ini back to 3 and recycle the qmgr?
|
Yes
Quote: |
What if more than 3 of the log files are active |
They won't be. The qmgr does a checkpoint when it is shut down. Only transactions involving external resource managers persist over a qmgr restart, so if you do not have any of those then the active log contains no entries at all.
Quote: |
Is there a way of seeing which logs are active? |
No
Quote: |
After recycling the qmgr, how would we know which logs are active and which we can delete? |
You cannot tell. Since this is circular logging, your best bet might be to create a qmgr of the same name and with the log file parameters you want on another machine, then replace the log files on your live qmgr with the new files.
Evne better would be to drain the queues, save the qmgr objects, and delete and recreate the qmgr with the right number of log files. |
|
Back to top |
|
 |
bbburson |
Posted: Thu Jan 13, 2005 6:38 am Post subject: Re: Reducing the number of log files |
|
|
Partisan
Joined: 06 Jan 2004 Posts: 378 Location: Nowhere near a queue manager
|
2189 wrote: |
- After recycling the qmgr, how would we know which logs are active and which we can delete? |
In some testing I did last week for another discussion, I observed the following behavior (WMQ 5.3 CSD08, circular logging):
I initially had the minimum number of log files (2 primary, 1 secondary). I edited qm.ini and increased both values by some amount, and stopped and started the queue manager. After loading lots of messages to a queue the number of log files increased as expected.
Then I edited qm.ini and reduced the number of logs back to the original values and bounced the queue manager. As I continued to put and get messages on the queue, the number of log files gradually decreased until I was finally down to the original 3 files only.
So it appears that WMQ itself will take care of deleting unneeded logs. NOTE this applies to CIRCULAR logs only; if you use LINEAR logs you have to manage the log files separately. |
|
Back to top |
|
 |
2189 |
Posted: Thu Jan 13, 2005 9:06 am Post subject: |
|
|
Apprentice
Joined: 22 Oct 2002 Posts: 31
|
Thanks for those replies, I've follows the same procedure that bbbuson documented and got the same results (530.7 CSD07) so it looks like we may be able to do it after all.
The test has however confused me as to how the logs work.
After increasing the logs I put messages to a queue and the logs increased as was described. I then reduced the number of logs and put more msgs on the queue. This then appeared to deleted the extra logs and created some secondary logs. What surprised me was when I continued putting msgs onto the queue which were far bigger than the log space available (50 x 1Mb messages and only 5 x 1MB logs) I didn't appear to run out of log space.
Can anyone explain this cos I'm now guessing I really don't understand how logs work?
Thanks
Gareth _________________ 2189 errors make me  |
|
Back to top |
|
 |
fjb_saper |
Posted: Thu Jan 13, 2005 9:14 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Circular logs only garantee transaction safety.
i.e. when the transaction is complete the log space can be overwritten.
What that means is that the messages on the queue are not garanteed even though they may be persistent. Only messages being currently enlisted in a transaction are garanteed.
Circular logs sometimes use the secondaries when more log space is needed than provided by the primaries to garantee transaction safety. As the secondary logfile is full -- and a primary is free to be overwritten -- the logging process switches to the primary. When the secondary is no longer needed the qmgr recognizes it as a secondary and removes it.
If you need to garantee more than just transaction safety you need to switch to LINEAR logging. Here if the queue is damaged you can recreate the queue and its contents from the logs.
Hope this clears some of the confusion.
Enjoy  |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|