CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Aug 2009
    Posts
    2

    How to avoid log fragmentation?

    Hi,

    We have a project with N+1 components, each creating a log file in parallel.
    On each boot the partition(NTFS) where the logs are created is checked with chkdsk /R.
    These logs generate a lot of fragmentation as you can imagine, thus the chkdsk gets really slow.

    What's the best method to avoid this fragmentation in your opinion?

    TIA,

  2. #2
    Join Date
    Feb 2002
    Posts
    4,640

    Re: How to avoid log fragmentation?

    The best way would probably be to create a single, larger, log file, instead of multiple little ones.

    Viggy

  3. #3
    Join Date
    Aug 2009
    Posts
    2

    Re: How to avoid log fragmentation?

    Thanks... Thought of that... but this would generate two issues:

    1) logs which come from otherwise rather autonomous entities would all be entangled and would require filtering before they would be readable (this is minor issue- we can make grepping a habit )

    2) we also have a Hypersonic database which writes it's data in a similar manner. And even though having just two files competing for clusters would statistically give a bit better fragmentation, the partition would still become rather fragmented over time...

  4. #4
    Join Date
    Jan 2002
    Location
    Scaro, UK
    Posts
    5,940

    Re: How to avoid log fragmentation?

    How about logging to a dababase? This needn't be a server-based solution - you can use SQL server compact as an embedded database.

    Darwen.
    www.pinvoker.com - PInvoker - the .NET PInvoke Interface Exporter for C++ Dlls.

Tags for this Thread

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured