Author |
Message
|
santnmq |
Posted: Wed Feb 16, 2011 11:20 pm Post subject: Use of Number log files (Primary/Secondry) in Linear logging |
|
|
Centurion
Joined: 11 Jan 2011 Posts: 125
|
I am a bit confused about the use of the number of primary log files defined in the configuration files. As I understand, Linear logging keeps the log data in a continuous sequence of files. Space is not reused, so you can always retrieve any record logged in any log extent that has not been deleted.
Not sure in what conditions the secondry log file will be used as qmgr can always add another new file for primary.
By specifying the number of primary log files, does it means that the total number of primary files limited to that number? |
|
Back to top |
|
 |
exerk |
Posted: Thu Feb 17, 2011 12:29 am Post subject: Re: Use of Number log files (Primary/Secondry) in Linear log |
|
|
 Jedi Council
Joined: 02 Nov 2006 Posts: 6339
|
santnmq wrote: |
...As I understand, Linear logging keeps the log data in a continuous sequence of files. Space is not reused, so you can always retrieve any record logged in any log extent that has not been deleted... |
I agree so far...
santnmq wrote: |
...Not sure in what conditions the secondry log file will be used as qmgr can always add another new file for primary... |
Have you considered that maybe that secondary log files might just be redundant in a linear-logging solution?
santnmq wrote: |
By specifying the number of primary log files, does it means that the total number of primary files limited to that number? |
You ask that question, yet stated "...Linear logging keeps the log data in a continuous sequence of files..."  _________________ It's puzzling, I don't think I've ever seen anything quite like this before...and it's hard to soar like an eagle when you're surrounded by turkeys. |
|
Back to top |
|
 |
santnmq |
Posted: Thu Feb 17, 2011 2:21 am Post subject: |
|
|
Centurion
Joined: 11 Jan 2011 Posts: 125
|
Quote: |
You ask that question, yet stated "...Linear logging keeps the log data in a continuous sequence of files..." |
you mean to say that there is no use of Number of primary files specified in the configuration for linear logging ? |
|
Back to top |
|
 |
exerk |
Posted: Thu Feb 17, 2011 2:30 am Post subject: |
|
|
 Jedi Council
Joined: 02 Nov 2006 Posts: 6339
|
You asked "...By specifying the number of primary log files, does it means that the total number of primary files limited to that number?...", yet also stated "...Linear logging keeps the log data in a continuous sequence of files...", so your question is at odds with your statement - think through the logic!
santnmq wrote: |
...you mean to say that there is no use of Number of primary files specified in the configuration for linear logging ? |
No, I did not mean that. Use is made of that parameter but rather than me tell you how you go and define two linear-logged queue managers each with a different number of primary logs and see what the result is. _________________ It's puzzling, I don't think I've ever seen anything quite like this before...and it's hard to soar like an eagle when you're surrounded by turkeys. |
|
Back to top |
|
 |
santnmq |
Posted: Thu Feb 17, 2011 3:09 am Post subject: |
|
|
Centurion
Joined: 11 Jan 2011 Posts: 125
|
at the time when you create the qmgr, the number of log files created as mentioned in the configuration file. this is true for both types of logging.
Suppose you have given 3 for primary and 2 for secondry ( default),
if you are using circular logging, logs will be kept in the ring of all 3 primary files, if first fills, it will move to second then third and then first again. In case of long living transactions, if qmgr is unable to reuse the primary file, it will allocate the log file from secondry pool.
If you are using Linear logging, logs will be kept in these prumary files and these are not reused. so qmgr can add the log files in to primary log pool whenever required. So in this case, i don't think secondry log files are of any use.
Please correct me if i am wrong anywhere. |
|
Back to top |
|
 |
Vitor |
Posted: Thu Feb 17, 2011 5:24 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
santnmq wrote: |
So in this case, i don't think secondry log files are of any use.
Please correct me if i am wrong anywhere. |
What's the difference between a "primary" log file and a "secondary" log file? Do you see 2 different kinds of files somplace? In 2 different locations? Where are these 2 "pools" you speak of?
The queue manager has one kind of log file. It pre-allocates and has available the configured number of primary files at all times. If there's not enough disc for these the queue manager won't start. If there's more data to be logged it will create additional log files up to the configured number of secondary files. If these fill as well, bad things start to happen. If there's not enough disc for these, bad things start to happen. Once the log size shrinks down (becuase there's been a commit for example) secondary space will be released. Primary will not. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
fjb_saper |
Posted: Thu Feb 17, 2011 7:27 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Vitor wrote: |
santnmq wrote: |
So in this case, i don't think secondry log files are of any use.
Please correct me if i am wrong anywhere. |
What's the difference between a "primary" log file and a "secondary" log file? Do you see 2 different kinds of files somplace? In 2 different locations? Where are these 2 "pools" you speak of?
The queue manager has one kind of log file. It pre-allocates and has available the configured number of primary files at all times. If there's not enough disc for these the queue manager won't start. If there's more data to be logged it will create additional log files up to the configured number of secondary files. If these fill as well, bad things start to happen. If there's not enough disc for these, bad things start to happen. Once the log size shrinks down (becuase there's been a commit for example) secondary space will be released. Primary will not. |
primary and secondary log files is all about log space management. Some consider having a max of primary logfiles to "reserve" the space. I prefer personally having the min of primary and a max of secondary. Reserve the OS space and monitor. This alerts you then as well if the QM behavior changes and you need to allocate more logspace.
Have fun  _________________ MQ & Broker admin |
|
Back to top |
|
 |
santnmq |
Posted: Thu Feb 17, 2011 9:01 pm Post subject: |
|
|
Centurion
Joined: 11 Jan 2011 Posts: 125
|
Thanks for your replies ..
I got some better understanding about logging.......... But I still need sometihng more with respect to both logging type ie. circular and linear.
You response does'nt differenciate between these two. |
|
Back to top |
|
 |
fjb_saper |
Posted: Thu Feb 17, 2011 9:08 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
santnmq wrote: |
Thanks for your replies ..
I got some better understanding about logging.......... But I still need sometihng more with respect to both logging type ie. circular and linear.
You response does'nt differenciate between these two. |
The reason for that is simple. Logspace management is not different if you use circular logging or if you use linear logging. The difference between those 2 is mainly the size of the logspace and maybe the usage graph / pattern.
Have fun  _________________ MQ & Broker admin |
|
Back to top |
|
 |
santnmq |
Posted: Thu Feb 17, 2011 9:59 pm Post subject: |
|
|
Centurion
Joined: 11 Jan 2011 Posts: 125
|
fjb_saper
Thanks you for clarifying this to me. |
|
Back to top |
|
 |
Vitor |
Posted: Fri Feb 18, 2011 5:09 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
santnmq wrote: |
You response does'nt differenciate between these two. |
Because there's no difference in how the queue manager handles the logs. The difference is how disc space is reclaimed; for circular logging the queue manager reclaims it, in the other case you need to. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
bruce2359 |
Posted: Fri Feb 18, 2011 6:32 am Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9469 Location: US: west coast, almost. Otherwise, enroute.
|
Oddly, both types of logs, and logging in general, are discussed in great detail in the WMQ System Administration manuals, and also in the WMQ introductory manuals. _________________ I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live. |
|
Back to top |
|
 |
mvic |
Posted: Fri Feb 18, 2011 3:31 pm Post subject: |
|
|
 Jedi
Joined: 09 Mar 2004 Posts: 2080
|
santnmq wrote: |
But I still need sometihng more with respect to both logging type ie. circular and linear. |
There is plenty about this in the MQ Information Center.
What items do you still need to know about circular vs. linear, after reading all the information IBM has provided?
Thanks for posting your questions, they are interesting for a lot of readers here, I think. |
|
Back to top |
|
 |
mvic |
Posted: Fri Feb 18, 2011 3:32 pm Post subject: |
|
|
 Jedi
Joined: 09 Mar 2004 Posts: 2080
|
Vitor wrote: |
Because there's no difference in how the queue manager handles the logs. |
There is a difference, mainly in the area of media images. |
|
Back to top |
|
 |
bruce2359 |
Posted: Fri Feb 18, 2011 4:02 pm Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9469 Location: US: west coast, almost. Otherwise, enroute.
|
mvic wrote: |
Vitor wrote: |
Because there's no difference in how the queue manager handles the logs. |
There is a difference, mainly in the area of media images. |
...and circular logs are re-used when they no longer are needed for re-start. Whereas, linear logs are never re-used. _________________ I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live. |
|
Back to top |
|
 |
|