rejetto forum

Software => HFS ~ HTTP File Server => Programmers corner => Topic started by: Domen ltd on December 06, 2009, 08:55:53 PM

Title: Reduce disk activity solution
Post by: Domen ltd on December 06, 2009, 08:55:53 PM
Hi, Rejetto!

Actually it is not a big problem. But it exists. As we know, HFS checks the template file an every second. Most of time it is needless. It is not a secret, that an every HDD has a MTBF (mean-time before failure). Let's help our HDDs to relax!!! :) If you like my code, you can use it as you want. This mod works fine.
Title: Re: Reduce disk activity solution
Post by: rejetto on December 08, 2009, 12:38:03 PM
thank you Domen ;)
i think what you see in the log is not HD activity, but system calls.
such calls should not make any drive activity, as the info i retrieve (file attribute) should be in the system cache.
am i wrong?
Title: Re: Reduce disk activity solution
Post by: Domen ltd on December 08, 2009, 05:40:53 PM
This screen capture shows the file system activity (not HDD, of course). So, maybe You are right :) But I do not have enought knowledge about system I/O requests (http://msdn.microsoft.com/en-us/library/ms796136.aspx, http://msdn.microsoft.com/en-us/library/ms806157.aspx). Are You 100% shure HFS reads info (file attribute) located in the system cache?
Title: Re: Reduce disk activity solution
Post by: rejetto on December 09, 2009, 10:12:06 AM
i'm just guessing that Windows does this way.
the system writes and reads everything, it should know if a cached information has been invalidated or not.
and even if the OS itself wouldn't do this way, the HDD at a lower level should notice the same sector being requested again and again, and provide the data directly from its cache, not bothering the magnetic discs.
i remember this behavior on MSDOS when i used smartdrive 15 years ago. :D
opinions?
Title: Re: Reduce disk activity solution
Post by: Domen ltd on December 09, 2009, 06:47:45 PM
As for file system caching opinion: none. "True is out of here..." [© X-Files] :)

FileMon unit - it is just one of methods to check for changes of files (that I prefer and apply in compilation of HFS). Everybody can choose the suitable one ::).
Title: Re: Reduce disk activity solution
Post by: rejetto on December 10, 2009, 01:46:28 PM
ok, i will wait for any information that will help us understand what's really going on.
until then, i will just apply the KISS principle, and also the "don't fix what's not broken". :)