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,
How to avoid log fragmentation?
Started by riotw7, Aug 17 2009 12:31 AM
6 replies to this topic
#1
Posted 17 August 2009 - 12:31 AM
|
|
|
#2
Posted 17 August 2009 - 06:40 AM
Assuming you mean something like you have a bunch of threads each creating log files, why not have a thread to handle logging to a single log file. The other threads could send messages to the logging thread.
#3
Posted 17 August 2009 - 06:57 AM
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...
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
Posted 17 August 2009 - 07:13 AM
Can you have them log to different drives?
#5
Posted 17 August 2009 - 10:41 PM
Unfortunately not.
I can also say that increasing cluster size of the partition from 4K to 64K helps too little...
I can also say that increasing cluster size of the partition from 4K to 64K helps too little...
#6
Posted 18 August 2009 - 07:39 AM
What you may need to do is periodically copy the logs to a different folder (creating unfragmented files) and then delete the originals. When you're laying down two files on the same drive at the same time, you're just begging for fragmentation.
#7
Posted 21 August 2009 - 04:21 AM
Although this will limit the fragmentation significally in the long run, it will still allow there to be N+1 fragmented log files, which make chkdsk sessions to take 30 sec/minute...


Sign In
Create Account

Back to top









