Author |
Message
|
wbiuid |
Posted: Tue Jun 21, 2005 5:11 am Post subject: Primary/Secondary log files and log file size? |
|
|
Apprentice
Joined: 14 Jun 2005 Posts: 34
|
Hi,
Can someone give me a high level description of some log file queries I have -
1. How do they work! Does MQ effectively write the contents of all persistent messages to the log files for recovery purposes? Does it then remove them once they have been destructively read from the queue? Or are they only used during a unit of work/transaction?
2. What is the difference/recommendation between having a large no. But if this means small log files versus small number of large log files?
3. Related to 2 above, if a large message is being written to a queue is bigger than a single log file does it start writing to the next log file or fail because you need a bigger log file (and therefore need to recreate QM with increased LogFilePage setting)?
Many thanks,
Rich |
|
Back to top |
|
 |
csmith28 |
Posted: Tue Jun 21, 2005 7:46 am Post subject: |
|
|
 Grand Master
Joined: 15 Jul 2003 Posts: 1196 Location: Arizona
|
Does MQ effectively write the contents of all persistent messages to the log files for recovery purposes?
Yes and to ensure persistence.
Does it then remove them once they have been destructively read from the queue?
No
What is the difference/recommendation between having a large no. But if this means small log files versus small number of large log files?
I have found it is better to have a few large log files as aposed to many small ones.
If a large message is being written to a queue is bigger than a single log file does it start writing to the next log file or fail because you need a bigger log file.
I believe it just writes the rest of the message in the next log. _________________ Yes, I am an agent of Satan but my duties are largely ceremonial. |
|
Back to top |
|
 |
Nigelg |
Posted: Tue Jun 21, 2005 8:15 am Post subject: |
|
|
Grand Master
Joined: 02 Aug 2004 Posts: 1046
|
The description you want is in the System Admin manual, where you should have looked first. |
|
Back to top |
|
 |
PeterPotkay |
Posted: Tue Jun 21, 2005 8:53 am Post subject: |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
csmith28 wrote: |
Does MQ effectively write the contents of all persistent messages to the log files for recovery purposes?
Yes and to ensure persistence.
|
Only if the logs are Linear.
The contents of persistent messages on a QM running with Circular logs are not logged. If you do the MQPUTs under syncpoint to a QM with circular logs, then the circular logs will need to temporarily hold the messages. As soon as you commit, the circular logs are free to be used for other purposes. The persistent messages are no longer in the circular logs. _________________ Peter Potkay
Keep Calm and MQ On |
|
Back to top |
|
 |
SAFraser |
Posted: Tue Jun 21, 2005 9:49 am Post subject: |
|
|
 Shaman
Joined: 22 Oct 2003 Posts: 742 Location: Austin, Texas, USA
|
Quote: |
The persistent messages are no longer in the circular logs. |
I wouldn't let this scare you, though. For a long time, we incurred the overhead for administration of linear logs on dozens and dozens of queue managers. Never once used them for recovery. Finally, we switched to circular logs and we have been quite happy.
That's not to say that you shouldn't ever use linear logs. I'm just relating our experience. IBM will typically recommend circular logs, I believe, unless you have an unusual business requirement to meet. |
|
Back to top |
|
 |
fjb_saper |
Posted: Tue Jun 21, 2005 12:59 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Well it really depends on what your business reason is....
If you are running a request/response non persistent model I'd say go for circular logging
If you are running a fire and forget persistent model I'd say it is prudent to use linear logging
It all boils down to the risk exposure you are willing to take in case of a crash....
Enjoy  |
|
Back to top |
|
 |
PeterPotkay |
Posted: Tue Jun 21, 2005 3:55 pm Post subject: |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
The whole Linear vs. Circular discussion is a good one. Personally, I fall on the Circular side.
If your q files are on SAN, or on mirrored disks, the liklihood of the q file being destroyed, and having to go to the Linear logs to getthe messages is remote (but possible!). I hope anyone that has linear logging has them mounted to a separate device. Kinda pointless to rely on Linear logs for message restoration if they live on the same disk that just crashed that housed the q files!
Also, even if you have persistent messages, and you have linear logging on separate hard disks, and something happens that kills the q files, how often does one have a queue with persistent messages backed up in it (shouldn't be using queue for DBs). MQ is a transport. And to that end, apps should be able to reproduce hyper critcal messages anyway.
Yeah, I guess if I ever have a damaged MQ object, it would be nice to restore it from the image in the linear log, but the one time it happened to us on circular, it was easy enough to delete the damaged q file, bounce the QM and recreate it.
Yes, Linear logs have some features that*might* be worthwhile. But I bet in most cases, its not really needed, or not properly implemented (logs on same device as q files).
To me, Linear Log administration is not worth the effort based on all of the above. Maybe for some it is. _________________ Peter Potkay
Keep Calm and MQ On |
|
Back to top |
|
 |
fjb_saper |
Posted: Tue Jun 21, 2005 5:25 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Well....
We use fire and forget and nearly all our messages are persistent.
As far as I know our disks are not mirrored.
We use 4 file systems
a) the programs
b) the data (qmgrs + queues) 4 Gigs
c) the logs (4 Gigs)
d) the archives 1 Gig
and yes even in development linear logging can be handy (especially when you or somebody else deleted part of the /var/mqm system without meaning to).
Like I said it all boils down to exposure and risk taking...
Enjoy and live dangerously.  |
|
Back to top |
|
 |
wbiuid |
Posted: Wed Jun 22, 2005 7:04 am Post subject: |
|
|
Apprentice
Joined: 14 Jun 2005 Posts: 34
|
All, may thanks for your replies.
To clarify that I understand what you are all saying :
If we use persistent messages with circular logging, messages on a queue still survive a queue manager restart. But if an object such as a queue bacame corrupt, the data on that queue could not be recovered from the logs as they are cyclical, but they could be if they were linear?
Thanks |
|
Back to top |
|
 |
fjb_saper |
Posted: Wed Jun 22, 2005 10:35 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
You got it  |
|
Back to top |
|
 |
|