Hi,
I noticed that after resetting the cache no reads are made for the same files. That probably means that windows have cached the files. That's good in most cases because windows uses he free ram as cache, but this makes collecting cache less efficient.
I would like to disable windows (read) cache for the disks that are in primo cache tasks for a day or two until primocache collects frequency information. Then I want to enable it again. Can this be done with currently available software or if not can this be implemented in primocache in the future? Also is this a good idea - I'm not sure how primocache decides what to keep in cache and what not?
PrimoCache + windows cache
-
- Level SS
- Posts: 477
- Joined: Wed Oct 06, 2010 11:10 pm
Re: PrimoCache + windows cache
See the Is the Windows cache off when Primo Cache is on? thread for a previous discussion on this. There seems to be very little one can do to reliably disable Windows' own cache (and a couple of utilities noted in that thread didn't actually do anything). However Microsoft do provide a Windows Dynamic Cache Service download which may be worth experimenting with.
As far as using Windows file cache together with Primo Cache goes, it does mean duplication and there are cases where it can result in performance loss (reads/writes cached by Windows are invisible to PrimoCache so the most frequently accessed data will drop out of Primo's cache over time - when Windows file cache gives up memory to an application this then results in such data becoming uncached and having to be read from disk again, which would not have happened had Windows' cache been disabled).
As far as using Windows file cache together with Primo Cache goes, it does mean duplication and there are cases where it can result in performance loss (reads/writes cached by Windows are invisible to PrimoCache so the most frequently accessed data will drop out of Primo's cache over time - when Windows file cache gives up memory to an application this then results in such data becoming uncached and having to be read from disk again, which would not have happened had Windows' cache been disabled).
Re: PrimoCache + windows cache
I tried I tried Windows Dynamic Cache Service. It doesn't work on windows 7. It's meant for windows server. Strangely enough it does include windows vista in supported OSs.
I tested filesystem cache by searching for all files. Even a day later (without restart) searching the filesystem again doesn't read anything from primocache. So filesystem is all in windows cache. That makes it slow after reboot. I tested it - after reboot searching the OS gives very low hit ratio. Filesystem is one of the major slow down in the whole disk - it's small blocks and they are usually not close to the file data. I guess that's why OS gives priority to FS caching.
If primocache can monitor reads before windows cache would be nice, but if it was possible it would have been done already.
I tested filesystem cache by searching for all files. Even a day later (without restart) searching the filesystem again doesn't read anything from primocache. So filesystem is all in windows cache. That makes it slow after reboot. I tested it - after reboot searching the OS gives very low hit ratio. Filesystem is one of the major slow down in the whole disk - it's small blocks and they are usually not close to the file data. I guess that's why OS gives priority to FS caching.
If primocache can monitor reads before windows cache would be nice, but if it was possible it would have been done already.
Re: PrimoCache + windows cache
Looks like it is not possible to complete disable Windows read cache, so better set PrimoCache as Write Only.
Windows cache will take care of the readings and PrimoCache the writings...
http://www.tenforums.com/tutorials/2190 ... -10-a.html
Windows cache will take care of the readings and PrimoCache the writings...
http://www.tenforums.com/tutorials/2190 ... -10-a.html
-
- Level SS
- Posts: 477
- Joined: Wed Oct 06, 2010 11:10 pm
Re: PrimoCache + windows cache
Setting Primo to write only would mean it only stores a copy of data written to disk. With Read/Write it would still have data read from disk that wasn't in Windows' file cache.
It is possible to disable Windows caching on a file-by-file basis by using the FILE_FLAG_NO_BUFFERING attribute so it might be possible for the PrimoCache service to include an option to set (or fake/spoof) this attribute on every file.
It is possible to disable Windows caching on a file-by-file basis by using the FILE_FLAG_NO_BUFFERING attribute so it might be possible for the PrimoCache service to include an option to set (or fake/spoof) this attribute on every file.
Re: PrimoCache + windows cache
FILE_FLAG_NO_BUFFERING requires sector-aligned reads and writes. PrimoCache can't really force it because the program making the read is probably not accounting for that restriction.
See: https://msdn.microsoft.com/en-us/librar ... s.85).aspx
See: https://msdn.microsoft.com/en-us/librar ... s.85).aspx
-
- Level SS
- Posts: 477
- Joined: Wed Oct 06, 2010 11:10 pm
Re: PrimoCache + windows cache
That is a quite a complication - looks like finding a way to change the Cache Manager's behaviour would be the only option then.