[OpenAFS-devel] Can I force an AFS client not to cache a file?
Nickolai Zeldovich
kolya@MIT.EDU
Tue, 17 Sep 2002 16:50:59 -0400
> I am building a custom logging solution for our AFS cell. In
> essence, I'm just logging all SRXAFS_FetchData() calls in fileserver, so
> when a specific FID is read by a client, a log entry is written
> somewhere.
>
> This works as long as the file is not in the client cache.
What do you mean by read? Even if you avoid caching on the client
side, consider the case of a program mmap()'ing a file and then
repeatedly reading the mapped memory. I suspect you won't get
repeated fetches in this case. (Even if you could do it, though,
your performance would be horrid, doing a network fetch for each
reference to the mapped file.)
> Is there a way to tell an AFS client NOT to cache a specific file, or
> to force a callback on that file so next time the client tries to read
> the file, the server is notified?
You could alter the callback times on the fileserver. With each
fetch request, the fileserver returns a callback time; it's controlled
by TimeOuts and MinTimeOut in src/viced/callback.c. Just reducing
those times should result in something closer to the behavior you
think you want.
As others have pointed out already, this will of course make your
performance considerably worse, for the majority of workloads.
-- kolya