Results 1 to 5 of 5
  1. #1
    Join Date
    Jan 2003
    Posts
    1,605

    Unanswered: 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

  2. #2
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    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

  3. #3
    Join Date
    Jan 2007
    Location
    Jena, Germany
    Posts
    2,721
    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

  4. #4
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    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

  5. #5
    Join Date
    Mar 2008
    Posts
    136
    yes I agreed with Marcus.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •