If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > What is better to have little and big primary logs or small and less primary logs?

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 04-17-08, 15:07
grofaty grofaty is offline
Registered User
 
Join Date: Jan 2003
Posts: 1,570
What is better to have little and big primary logs or small and less primary logs?

Hi,
when settings primary vs. secondary logs there is general rule to use primary logs, according to database snapshot info. But what is recommendation to use primary logs? Should I use multiple small primary logs or small amount of big primary logs.

Variant 1:
LOGFILSIZ = 10000
LOGPRIMARY = 4
disk primary log capacity = LOGFILSIZ * LOGPRIMARY = 40000 pages

or

Variant 2:
LOGFILSIZ = 2000
LOGPRIMARY = 20
disk primary log capacity = LOGFILSIZ * LOGPRIMARY = 40000 pages

When should I choose variant 1 (so small amount of big logs) and when variant 2 (multiple small files).

Thanks,
Grofaty
Reply With Quote
  #2 (permalink)  
Old 04-17-08, 15:43
ARWinner ARWinner is offline
Registered User
 
Join Date: Jan 2003
Posts: 3,575
I think it only matters if archival logging is enabled. If the sizes are too small, then the time spent doing the archive will increase because you will be doing more of them. If the sizes are too big then you lose the time in moving the large files. The basic rule of thumb is to have the size set so that archiving happens not too often, but that sending the files is not a burden either. This is something that depends on your particular system, so no canned size can be given. Once you have the proper size determined, then you make sure that your quantity is sufficient to not get the "out of log space" error.

Andy
Reply With Quote
  #3 (permalink)  
Old 04-17-08, 16:08
stolze stolze is offline
Registered User
 
Join Date: Jan 2007
Location: Jena, Germany
Posts: 2,662
Secondary logs are allocated when needed and freed when not needed any longer. So with a lot of logging occurring, the time to allocate and free (secondary log) files could be an issue, too.
__________________
Knut Stolze
IBM DB2 Analytics Accelerator
IBM Germany Research & Development
Reply With Quote
  #4 (permalink)  
Old 04-17-08, 19:17
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,196
General rule of thumb is that large log files perform better (fewer number of time that active log file needs to be switched and archived), and smaller ones provide a faster recovery time in case of crash recovery. The speed of crash recovery is usually only relevant in extreme applications, so I favor the larger log files.
__________________
M. A. Feldman
IBM Certified DBA on DB2 for Linux, UNIX, and Windows
IBM Certified DBA on DB2 for z/OS and OS/390
Reply With Quote
  #5 (permalink)  
Old 04-18-08, 02:27
Pawan Kumar Pawan Kumar is offline
Registered User
 
Join Date: Mar 2008
Posts: 120
yes I agreed with Marcus.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On