Author |
Message
|
Meenakshi Dhawale |
Posted: Thu Aug 23, 2007 9:41 am Post subject: Linear or circular logging? |
|
|
Novice
Joined: 29 May 2007 Posts: 12 Location: India
|
Hi,
If there are 1lakh messages tobe send which are non persistent
then which logging should be used and why? |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu Aug 23, 2007 9:42 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
|
Back to top |
|
 |
velocity |
Posted: Fri Nov 30, 2007 8:35 am Post subject: |
|
|
Centurion
Joined: 30 Nov 2007 Posts: 126
|
Circular logging
Used when media recovery is not required. The log files in circular logging are viewed as a closed ring; when a log file contains no active log records, it becomes available for reuse. An active log record is one that is still required to restart the queue manager. One of the advantages of circular logging is that the disk space required for the log does not increase with time.
Linear logging
Needed to support media recovery. The log files are viewed as a sequence. A log file used in linear logging is never deleted, but it does become inactive when it contains no active log records. New log files are added to the sequence as required, so no space is reused. Inactive log files could be archived to release disk space, but there is no automatic mechanism to support this.
Read Back up recovery guide for more info |
|
Back to top |
|
 |
Nigelg |
Posted: Sat Dec 01, 2007 7:06 pm Post subject: |
|
|
Grand Master
Joined: 02 Aug 2004 Posts: 1046
|
Non-persistent mss are not stored in the logs, so the logging type is irrelevant. _________________ MQSeries.net helps those who help themselves.. |
|
Back to top |
|
 |
bruce2359 |
Posted: Mon Dec 03, 2007 7:21 am Post subject: |
|
|
Guest
|
Quote: |
If there are 1lakh messages tobe send which are non persistent then which logging should be used and why? |
This is like the riddle that ponders: I have two coins totaling 35 cents. one of the coins is not a quarter.
Knowing that one/some messages are non-persistent doesn't tell us about others that are persistent. In this instance, I wouldn't use circular logs on the likely chance that some new application would generate persistent messages. |
|
Back to top |
|
 |
PeterPotkay |
Posted: Mon Dec 03, 2007 9:39 am Post subject: |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
Persistent messages do not preclude the use of circular logs.
Non persistent messages put or got under syncpoint do use the logs. _________________ Peter Potkay
Keep Calm and MQ On |
|
Back to top |
|
 |
jefflowrey |
Posted: Mon Dec 03, 2007 10:23 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
PeterPotkay wrote: |
Persistent messages do not preclude the use of circular logs. |
But hope your xmitqs don't get damaged. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
PeterPotkay |
Posted: Mon Dec 03, 2007 10:40 am Post subject: |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
jefflowrey wrote: |
PeterPotkay wrote: |
Persistent messages do not preclude the use of circular logs. |
But hope your xmitqs don't get damaged. |
...if they have messages in them. Applies to any local q, not just XMITQs.
Of course if you rely on linear logs for media recovery, you have to hope that those logs are 100% available.
An object gets damaged versus a log file is N/A - is one more likely than the other?
Frankly I've never understood why linear logs were created with the ability to provide media recovery but circulars weren't. _________________ Peter Potkay
Keep Calm and MQ On |
|
Back to top |
|
 |
bruce2359 |
Posted: Mon Dec 03, 2007 10:52 am Post subject: |
|
|
Guest
|
As this post suggests, we must design our internal architecture with the future in mind - not just today's requirements.
Speed may be todays requirement (because of bandwidth limitations) may suggest non-persistnet messages and NPMSPEED(FAST); but we are supposed to know better. The IBM narrative says that logging has performance impact; but does the (slight) impact offset the possible loss of messages - however unlikely.
IBM doc warns against long-running u-of-w's, especially with circular logging. Media recovery, itself, is not 'the' reason to use linear logs. |
|
Back to top |
|
 |
jefflowrey |
Posted: Mon Dec 03, 2007 11:02 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
PeterPotkay wrote: |
jefflowrey wrote: |
PeterPotkay wrote: |
Persistent messages do not preclude the use of circular logs. |
But hope your xmitqs don't get damaged. |
...if they have messages in them. Applies to any local q, not just XMITQs. |
Yes, but most people think of "if they have messages in them" to mean "if they have messages sitting in them for a while", as opposed to "had messages in them very briefly".
I had this happen to a client recently - where the q file behind SYSTEM.CLUSTER.TRANSMIT.QUEUE got damaged... _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
PeterPotkay |
Posted: Mon Dec 03, 2007 11:10 am Post subject: |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
jefflowrey wrote: |
I had this happen to a client recently - where the q file behind SYSTEM.CLUSTER.TRANSMIT.QUEUE got damaged... |
Nice. Did you ever figure out how / why?
Were there messages in the q that you needed to preserve? _________________ Peter Potkay
Keep Calm and MQ On |
|
Back to top |
|
 |
jefflowrey |
Posted: Mon Dec 03, 2007 11:15 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
PeterPotkay wrote: |
jefflowrey wrote: |
I had this happen to a client recently - where the q file behind SYSTEM.CLUSTER.TRANSMIT.QUEUE got damaged... |
Nice. Did you ever figure out how / why?
Were there messages in the q that you needed to preserve? |
Not yet... and backup of q file was not taken. It was a test platform. Recovery was performed through strmqm -c. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
Nigelg |
Posted: Mon Dec 03, 2007 1:07 pm Post subject: |
|
|
Grand Master
Joined: 02 Aug 2004 Posts: 1046
|
Quote: |
Non persistent messages put or got under syncpoint do use the logs.
|
No they don't. NP msgs are never written to the logs; they exist only in memory or in a non-persistent buffer in the queue file. _________________ MQSeries.net helps those who help themselves.. |
|
Back to top |
|
 |
PeterPotkay |
Posted: Mon Dec 03, 2007 1:39 pm Post subject: |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
Nigel,
I never said they were.
You wrote "Non-persistent mss are not stored in the logs, so the logging type is irrelevant."
But if you put/get non persistent messages under syncpoint the logs will come into play to keep track of the Unit of Work, right? Granted, the non persistent messages themselves are not in the logs, but the transaction info is. And if the UOW is going to be a very long one, the size / type of your logs comes into play even for NP messages. _________________ Peter Potkay
Keep Calm and MQ On |
|
Back to top |
|
 |
Nigelg |
Posted: Mon Dec 03, 2007 5:49 pm Post subject: |
|
|
Grand Master
Joined: 02 Aug 2004 Posts: 1046
|
Peter
You are right, UoW info is in the log, sorry about that.
However, it does not matter which logging type is in use, live trans cannot span more than the active log, and so in either logging type long-running trans are rolled back. _________________ MQSeries.net helps those who help themselves.. |
|
Back to top |
|
 |
|