2003-06-03 13:20:26

by Edward Hibbert

[permalink] [raw]
Subject: RE: [NFS] Disabling Symbolic Link Content Caching in NFS Client



-----Original Message-----
From: Vivek Goyal [mailto:[email protected]]
Sent: Tuesday, June 03, 2003 2:21 PM
To: [email protected]; Ion Badulescu
Cc: [email protected]; [email protected]; [email protected];
[email protected]; [email protected];
[email protected]; Vivek Goyal
Subject: RE: [NFS] Disabling Symbolic Link Content Caching in NFS Client

<snip>

You are right. But our idea is to provide an option to disable/enable
caching based on the nature of intended application.

[EH] Hear hear :-).

Our application consists of a number of machines collaborating on a shared
database over NFS. We therefore require the ability to force data to be
sync'd from the client to the backend - and at the moment we do this by
disabling caching completely, via the noac option and acquiring and
releasing non-exclusive locks round io calls.

Any improvements in the granularity of control over NFS client-side caching
would be very valuable to us.

Regards,

Edward Hibbert
Internet Applications Group
Data Connection Ltd
Tel: +44 131 662 1212 Fax: +44 131 662 1345
Email: [email protected] Web: http://www.dataconnection.com



2003-06-03 14:32:38

by Frank van Maarseveen

[permalink] [raw]
Subject: Re: [NFS] Disabling Symbolic Link Content Caching in NFS Client

On Tue, Jun 03, 2003 at 02:33:45PM +0100, Edward Hibbert wrote:
>
> Our application consists of a number of machines collaborating on a shared
> database over NFS. We therefore require the ability to force data to be
> sync'd from the client to the backend - and at the moment we do this by
> disabling caching completely, via the noac option and acquiring and
> releasing non-exclusive locks round io calls.
>
> Any improvements in the granularity of control over NFS client-side caching
> would be very valuable to us.

To disable ac for a single directory for a certain amount of time, see

http://web.inter.nl.net/users/fvm/nfs-noac/2.4.20-noac-timeout.patch
http://web.inter.nl.net/users/fvm/nfs-noac/readme:

This patch implements /proc/sys/net/nfs/noac-timeout

When a nonzero value is written, suspend atribute caching for the current
working directory and one level of files inside for the specified number
of seconds. Attribute caching will automatically be enabled when the time
elapses. Writing a zero re-enables attribute caching as well. Reading
yields the number of remaining seconds attribute caching will be disabled.


Maybe an NFS specific ioctl would be cleaner. But the above patch can be
used even from simple scripts.

--
Frank

2003-06-03 15:55:37

by Trond Myklebust

[permalink] [raw]
Subject: Re: [NFS] Disabling Symbolic Link Content Caching in NFS Client

>>>>> " " == Edward Hibbert <[email protected]> writes:

> Our application consists of a number of machines collaborating
> on a shared database over NFS. We therefore require the
> ability to force data to be sync'd from the client to the
> backend - and at the moment we do this by disabling caching
> completely, via the noac option and acquiring and releasing
> non-exclusive locks round io calls.

What does this have to do with symlinks?

...and why can't you use DIRECTIO? The above sort of application is
exactly what it is being introduced for.

Cheers,
Trond