Re: How does one stop cache flushing?



What is the difference between ntcacheset.zip and setsystemfilecachesize.zip?

So under Wxp, when you quit an application, the Performance Monitor "Cache
Bytes" counter usually decreases in size because the workset values have
changed and not the true cache size. Is that correct?

There is a way to display the true W98 cache size so
there should be some way of displaying the true Wxp cache size . Are you
positively sure there is no way of displaying the true Wxp cache size?
__________________________________________________________________
"Uwe Sieber" wrote:


b11_ wrote:
Hi Uwe:

Under Wxp, when you quit an application or game, the Performance Monitor
"Cache Bytes" counter decreases in size drasticly and unnessasarily.

Nessasarily or not is is a question of definition. The cache
content isn't discarded, it's only the working set that is
trimmed. I see no problem here. What is your problem? These
numbers only?

> Under
W98, the cache size decreases only when nessasarily, such as when memory is
needed to run a big application.

So does XP. It's the working set only that is trimmed.

I do have a utility which shows the minimum and maximum cache workset but
Wxp sometimes seems to ignore the minimum and maximum.

Systinternals Cacheset? Then there is nothing to ignore because
these are no settings, these are one time calls.

If, as you have stated, the Performance Monitor "Cache Bytes" counter does
not display the true cache size then which Performance Monitor counter does?

It seems there is no such item.

If only a fixed cache working set size makes you happy then
update to Windows 2003 Server or Windows Vista. Here you can
set permanent limits for it:
http://www.uwe-sieber.de/ntcacheset.html



Uwe





________________________________________________________________
"Uwe Sieber" wrote:

b11_ wrote:
Under Wxp, when you quit an application, the file cache is flushed (file
cache size drops dramaticly and unnesssarily).
That's not true. What you are calling 'file cache size' is the file
cache's working set.
The working set is the memory that has been recently used so Windows
expects that it is used again in the near future. Every process has
a working set and the file cache has too. A process's working set
is shown by the taskman in the process list as 'Mem usage' which is
misleading. Vista's taskman uses the true name: 'Working Set'.
The working set of a process is trimmed when its main window is
minimized. You can watch this in the taskman.
Trimming the working set doesn't mean that the memory is taken away from
its owner. It only means that the Windows memory management thinks that
it's not important to hold it in physical RAM. Applications memory
might be swapped out to the pagefile, file cache's memory might be
discarded. As long as the memory owned by the file cache is not required
for something else it's still availlable and its content valid. Read
accesses will still come out of the file cache.
Here is my simple test tool:
http://www.uwe-sieber.de/files/filecachetest.zip

Check 'FILE_FLAG_RANDOM_ACCESS'. This flag makes Windows blow up the
file caches working set. Then click 'Write'. In the perfmon you can
seen the 'Cache Bytes' growing. When you click 'Close' Windows takes
the cache memory for this file out of the cache's working set. You
can seen the 'Cache Bytes' go down. When you click 'read' you will
see that the file is read lightning fast (some hundred MB/s) even
the cache's working set had been trimmed before. The cache's content
surived the trimming...

> How can one stop the file
> cache flushing that occurs after one quits an application?

What it is effect you have a problem with this apart from some numbers
shown in the taskman or perfmon?


Uwe


.