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 » Reducing the number of log files

Post new topic  Reply to topic
 Reducing the number of log files « View previous topic :: View next topic » 
Author Message
2189
PostPosted: Thu Jan 13, 2005 4:43 am    Post subject: Reducing the number of log files Reply with quote

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
View user's profile Send private message
Nigelg
PostPosted: Thu Jan 13, 2005 5:26 am    Post subject: Reply with quote

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
View user's profile Send private message
bbburson
PostPosted: Thu Jan 13, 2005 6:38 am    Post subject: Re: Reducing the number of log files Reply with quote

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
View user's profile Send private message
2189
PostPosted: Thu Jan 13, 2005 9:06 am    Post subject: Reply with quote

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
View user's profile Send private message
fjb_saper
PostPosted: Thu Jan 13, 2005 9:14 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » General IBM MQ Support » Reducing the number of log files
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.