Caching for Performance?

Hi,

I am wring a sort of redirector. I noticed through filemon that there were approximately 50 IRP_MJ_CREATE requests directed to the redirector when I click viewing file properties in Explorer on Windows 2000. Since each time a file is opened, the redirector will send the request ultimately to remote file server, this generates a lot of network traffic and overhead.

My question is how to retain the FCB through Cache Manager, so that subsequent create request can be satisfied locally instead of opening it again through the network? Or do I have to create my own caching pool to keep the FCB? Or should I cache the remote file on local storage? How is it usually done?

Any information is appreciated!

Thanks.

Lijun


Do You Yahoo!?
HotJobs, a Yahoo! service - Search Thousands of New Jobs

Use your own caching pool, the Cc only caches the data pages.

----- Original Message -----
From: Lijun Wang
To: File Systems Developers
Sent: Wednesday, August 14, 2002 6:38 PM
Subject: [ntfsd] Caching for Performance?

Hi,

I am wring a sort of redirector. I noticed through filemon that there were approximately 50 IRP_MJ_CREATE requests directed to the redirector when I click viewing file properties in Explorer on Windows 2000. Since each time a file is opened, the redirector will send the request ultimately to remote file server, this generates a lot of network traffic and overhead.

My question is how to retain the FCB through Cache Manager, so that subsequent create request can be satisfied locally instead of opening it again through the network? Or do I have to create my own caching pool to keep the FCB? Or should I cache the remote file on local storage? How is it usually done?

Any information is appreciated!

Thanks.

Lijun


Do You Yahoo!?
HotJobs, a Yahoo! service - Search Thousands of New Jobs — You are currently subscribed to ntfsd as: xxxxx@storagecraft.com To unsubscribe send a blank email to %%email.unsub%%

Lijun Wang writes:

> My question is how to retain the FCB through Cache Manager, so that
> subsequent create request can be satisfied locally instead of opening it
> again through the network? Or do I have to create my own caching pool to
> keep the FCB? Or should I cache the remote file on local storage? How is
> it usually done?
>
If you want full control over how long the FCB stays around, you should
keep your own pool. If you want to cache file data, Cc is a natural choice.

Any way, you will still get the same create requests, so you need to be
able to do a reasonable lookup of the path, possibly just match it against
recent paths. Do you keep all needed metadata in your FCB?

I think the first question is how much you know about if your cache will be
valid, whether it is acceptable (or sometimes even preferable) to use stale
information. Or does your client having the file open block other requests?
Some of us have to deal with concurrent updates on the server.

Me, I use local files to cache data because
* possibly a lot of data
* possibly serious network latencies
* I get callbacks from the server when cached info/data changes
* the cache can be validated after network loss or reboot

I don’t know whether this was a good choice or not, but it does bring some
interesting problems. My guess is you probably want to start with some
smaller scale caching.

/Tomas