Can I get Cache Manager to clear its cache?

I am attempting some performance measurements on a large 6GB server. I have
tracked down some unexplained discrepecies in thre figures to whether I had
just rebooted or not. Presumably, if had not rebooted, my 2.5GB of test data
was all in the cache! So I need to reboot betwen runs. But this machine
takes about 10 minutes to do this [Anyone remember hitting Ctrl-Alt-Del and
*immediately* seeing “C>”? That’s progress for you!].

So - is there a tool or an API by which I can cause Cc to throw away
everything it has cached, in order to get some form of reproducibility? I
can’t be the only person who has suffered with this.

Brian

I have been looking for something like this for some time.

I guess one way to do this is to cause a volume dismount, but I don’t know how to do this programatically (for example the way ‘format’ command would cause a volume being formatted to dismount).

During dismount, the FSD will cause all the cache manager references to be ‘purged’ for all the File Objects belonging to the volume being dismounted. If VMM/CM are the only components in the system holding refereces to any file objects on the volume (i.e. on one else in the system have open handles/references), at the end of the dismount, one can continue testing after remounting the volume.

Manish

Brian Collins wrote:
I am attempting some performance measurements on a large 6GB server. I have
tracked down some unexplained discrepecies in thre figures to whether I had
just rebooted or not. Presumably, if had not rebooted, my 2.5GB of test data
was all in the cache! So I need to reboot betwen runs. But this machine
takes about 10 minutes to do this [Anyone remember hitting Ctrl-Alt-Del and
immediately seeing “C>”? That’s progress for you!].

So - is there a tool or an API by which I can cause Cc to throw away
everything it has cached, in order to get some form of reproducibility? I
can’t be the only person who has suffered with this.

Brian


Questions? First check the IFS FAQ at https://www.osronline.com/article.cfm?id=17

You are currently subscribed to ntfsd as: xxxxx@yahoo.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

---------------------------------
Do you Yahoo!?
Yahoo! Mail is new and improved - Check it out!

A sequence of:

FSCTL_LOCK_VOLUME
FSCTL_DISMOUNT_VOLUME
FSCTL_UNLOCK_VOLUME

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com

----- Original Message -----
From: Manish Apte
To: Windows File Systems Devs Interest List
Sent: Thursday, June 17, 2004 6:52 AM
Subject: Re: [ntfsd] Can I get Cache Manager to clear its cache?

I have been looking for something like this for some time.

I guess one way to do this is to cause a volume dismount, but I don’t know how to do this programatically (for example the way ‘format’ command would cause a volume being formatted to dismount).

During dismount, the FSD will cause all the cache manager references to be ‘purged’ for all the File Objects belonging to the volume being dismounted. If VMM/CM are the only components in the system holding refereces to any file objects on the volume (i.e. on one else in the system have open handles/references), at the end of the dismount, one can continue testing after remounting the volume.

Manish

Brian Collins wrote:
I am attempting some performance measurements on a large 6GB server. I have
tracked down some unexplained discrepecies in thre figures to whether I had
just rebooted or not. Presumably, if had not rebooted, my 2.5GB of test data
was all in the cache! So I need to reboot betwen runs. But this machine
takes about 10 minutes to do this [Anyone remember hitting Ctrl-Alt-Del and
immediately seeing “C>”? That’s progress for you!].

So - is there a tool or an API by which I can cause Cc to throw away
everything it has cached, in order to get some form of reproducibility? I
can’t be the only person who has suffered with this.

Brian


Questions? First check the IFS FAQ at https://www.osronline.com/article.cfm?id=17

You are currently subscribed to ntfsd as: xxxxx@yahoo.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

------------------------------------------------------------------------------
Do you Yahoo!?
Yahoo! Mail is new and improved - Check it out! — Questions? First check the IFS FAQ at https://www.osronline.com/article.cfm?id=17 You are currently subscribed to ntfsd as: xxxxx@storagecraft.com To unsubscribe send a blank email to xxxxx@lists.osr.com

Thanks Maxim. I’ll give it a try.

Brian
“Maxim S. Shatskih” wrote in message news:xxxxx@ntfsd…
A sequence of:

FSCTL_LOCK_VOLUME
FSCTL_DISMOUNT_VOLUME
FSCTL_UNLOCK_VOLUME

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com

----- Original Message -----
From: Manish Apte
To: Windows File Systems Devs Interest List
Sent: Thursday, June 17, 2004 6:52 AM
Subject: Re: [ntfsd] Can I get Cache Manager to clear its cache?

I have been looking for something like this for some time.

I guess one way to do this is to cause a volume dismount, but I don’t know how to do this programatically (for example the way ‘format’ command would cause a volume being formatted to dismount).

During dismount, the FSD will cause all the cache manager references to be ‘purged’ for all the File Objects belonging to the volume being dismounted. If VMM/CM are the only components in the system holding refereces to any file objects on the volume (i.e. on one else in the system have open handles/references), at the end of the dismount, one can continue testing after remounting the volume.

Manish

Brian Collins wrote:
I am attempting some performance measurements on a large 6GB server. I have
tracked down some unexplained discrepecies in thre figures to whether I had
just rebooted or not. Presumably, if had not rebooted, my 2.5GB of test data
was all in the cache! So I need to reboot betwen runs. But this machine
takes about 10 minutes to do this [Anyone remember hitting Ctrl-Alt-Del and
immediately seeing “C>”? That’s progress for you!].

So - is there a tool or an API by which I can cause Cc to throw away
everything it has cached, in order to get some form of reproducibility? I
can’t be the only person who has suffered with this.

Brian


Questions? First check the IFS FAQ at https://www.osronline.com/article.cfm?id=17

You are currently subscribed to ntfsd as: xxxxx@yahoo.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

----------------------------------------------------------------------------
Do you Yahoo!?
Yahoo! Mail is new and improved - Check it out! — Questions? First check the IFS FAQ at https://www.osronline.com/article.cfm?id=17 You are currently subscribed to ntfsd as: xxxxx@storagecraft.com To unsubscribe send a blank email to xxxxx@lists.osr.com

I resort to the same trick of dismounting the volume in my testing to ensure that the cache is purged.

If you are dealing with a single file (or a volume which you cannot dismount) and you know all the handles are closed to the file you want purged from the cache, you can get the file system to flush and purge the cached data for you by opening a unbuffered handle for write access. To avoid the overhead of maintaining cache coherency, the file system will flush and purge the file during the CREATE processing. Then you can just close the handle. Of course, this may not work on non-MS file systems because it is not a requirement for proper functionality, but I know that FAT and NTFS do this.

Thanks,
Molly Brown
Microsoft Corporation

This posting is provided “AS IS” with no warranties, and confers no rights.


From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Brian Collins
Sent: Thursday, June 17, 2004 5:49 AM
To: Windows File Systems Devs Interest List
Subject: Re:[ntfsd] Can I get Cache Manager to clear its cache?

Thanks Maxim. I’ll give it a try.
?
Brian
“Maxim S. Shatskih” wrote in message news:xxxxx@ntfsd…
??? A sequence of:
?
??? FSCTL_LOCK_VOLUME
??? FSCTL_DISMOUNT_VOLUME
??? FSCTL_UNLOCK_VOLUME
?
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com
----- Original Message -----
From: Manish Apte
To: Windows File Systems Devs Interest List
Sent: Thursday, June 17, 2004 6:52 AM
Subject: Re: [ntfsd] Can I get Cache Manager to clear its cache?

I have been looking for something like this for some time.
?
I guess one way to do this is to cause a volume dismount, but I don’t know how to do this programatically (for example the way ‘format’ command would cause a volume being formatted to dismount).
?
During dismount, the FSD?will cause all the cache manager references to be ‘purged’ for all the File Objects belonging to the volume being dismounted. If VMM/CM are the only components in the system holding refereces to any file objects on the volume (i.e. on one else in the system have open handles/references), at the end of the dismount, one can continue testing after remounting the volume.
?
Manish

Brian Collins wrote:
I am attempting some performance measurements on a large 6GB server. I have
tracked down some unexplained discrepecies in thre figures to whether I had
just rebooted or not. Presumably, if had not rebooted, my 2.5GB of test data
was all in the cache! So I need to reboot betwen runs. But this machine
takes about 10 minutes to do this [Anyone remember hitting Ctrl-Alt-Del and
immediately seeing “C>”? That’s progress for you!].

So - is there a tool or an API by which I can cause Cc to throw away
everything it has cached, in order to get some form of reproducibility? I
can’t be the only person who has suffered with this.

Brian


Questions? First check the IFS FAQ at https://www.osronline.com/article.cfm?id=17

You are currently subscribed to ntfsd as: xxxxx@yahoo.com
To unsubscribe send a blank email to xxxxx@lists.osr.com
________________________________________
Do you Yahoo!?
Yahoo! Mail is new and improved - Check it out! — Questions? First check the IFS FAQ at https://www.osronline.com/article.cfm?id=17 You are currently subscribed to ntfsd as: xxxxx@storagecraft.com To unsubscribe send a blank email to xxxxx@lists.osr.com

Questions? First check the IFS FAQ at https://www.osronline.com/article.cfm?id=17

You are currently subscribed to ntfsd as: xxxxx@windows.microsoft.com
To unsubscribe send a blank email to xxxxx@lists.osr.com