All of lore.kernel.org
 help / color / mirror / Atom feed
* RE: NFSv4 and client caching to local disk?
@ 2003-03-28 15:16 Lever, Charles
  2003-03-31 12:33 ` James Pearson
  0 siblings, 1 reply; 15+ messages in thread
From: Lever, Charles @ 2003-03-28 15:16 UTC (permalink / raw)
  To: James Pearson; +Cc: nfs

hi james-

> I'm trying to find out more about 'cachefs' type file systems=20
> that can=20
> cache NFS data to a client's local disk - I've come across a=20
> couple of=20
> references that seem to indicate that this may be possible with NFSv4.
>=20
> Does (will?) the Linux NFSv4 client support this feature?

Sun implemented cachefs on Solaris for earlier versions of NFS.
it really has nothing to do with which version of NFS that is
in use.

there is sporadic interest in a cachefs on Linux, and i know of
at least one generic prototype.  a specific implementation of
client-side disk caching that is available today is contained
in the Linux OpenAFS client (known as the AFS cache manager).

cachefs becomes rather more interesting when used in conjunction
with NFSv4 file delegations -- that makes NFS behave in a fashion
similar to AFS client-side disk caching with callbacks.

there currently is no explicit plan to implement cachefs by the
team that is working on NFSv4 for Linux.  a disk cache has
rather limited usefulness compared to a memory cache.  what is
your application for it?



-------------------------------------------------------
This SF.net email is sponsored by:
The Definitive IT and Networking Event. Be There!
NetWorld+Interop Las Vegas 2003 -- Register today!
http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en
_______________________________________________
NFS maillist  -  NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs

^ permalink raw reply	[flat|nested] 15+ messages in thread
* Re: NFSv4 and client caching to local disk?
@ 2003-04-03 16:31 Brashers_Per
  0 siblings, 0 replies; 15+ messages in thread
From: Brashers_Per @ 2003-04-03 16:31 UTC (permalink / raw)
  To: nfs

Since we are now outside of NFSv4, and into application level distribution,
I will throw in a few thoughts.

There are 3 major 'handles' that you can grab to move data; Files, Blocks,
and Tracks.  Each of these has there limitations, and idiosyncrasies, so yes
integrating with apps is difficult.  Running an agent and moving things
around via files is by far the most intuitive, I have had experience with
OnCourse doing this and it has proven stable.  The big issue is how to find
the files in the first place, when to 'expire them' and such.  Where as
rules can be written to handle this, I am a bit to faint of heart to do so.

On the block level we all know snap-mirror or Celerra Replicator, and the
associated freeze/thaw methods used.  The trouble with block level
replication is, who is allowed to apply the changes, and how do the apps get
to know about it?  Since we are fortunate enough to not suffer a life of
windowze, we are in pretty good shape.  But....  If we move to v4 and start
down the road of client side caching, how do we know when the server shall
mark the clients mem map dirty?  What tolerances are there for
inconsistencies, and do we care if it is just a read or do we check a finger
print every time....

Then comes the track level, think of raid 1 +1.  That is a mirror of a
mirror that one can move all about.  Now we get into even more trouble, as
we have a replica, but how does the server handle the swap off of the older
replica (assuming this is in a running state) to a newer one.   Or worse yet
we only have a singe destination replica, so we either break rule #1 (never
allow 2 hosts to use the same partition at the same time) and make a
messaging interface, or we go through a freeze/thaw cycle again and flush
the mem map of the server mounting it.  Even after all this is done, your
still back in the world of notifying your clients.

My $.02 is not to put replication/caching in the protocol, but to have some
'intelligent' rules based system that can act as a
push/pull/replicate/stale/redirect/refresh service, that can be tailored to
cope with the oddities that each application will be presenting.  Failing
that the next smoothest thing is to do the third mirror, as the development
of such an interface to do the meta-data passing could prove extremely
interesting, multiple r/w clients on a single data source.... (MPFS does
this if your i/o size is large enough)

Hope this has provoked some thoughts.

Per


Date: Tue, 01 Apr 2003 21:56:05 +0100
From: James Pearson <james-p@moving-picture.com>
To: Bogdan Costescu <bogdan.costescu@iwr.uni-heidelberg.de>
CC:  nfs@lists.sourceforge.net
Subject: Re: [NFS] NFSv4 and client caching to local disk?

We already do some distribution of large 'static' files to clients - but 
we don't have full control of the 3rd party applications we run as to 
where they look for their data - therefore it would be 'nice' to have 
the option of allowing the OS to do this for us ...

James Pearson

Bogdan Costescu wrote:
> On Mon, 31 Mar 2003, Jake Gold wrote:
> 
> 
>>I have a FAS940 with a cluster of Linux machines mounting _read-only_
>>volumes over NFSv3. My situation is the same as James Pearson's....those
>>machines read large, rarely modified files, where memory caching doesn't
>>help a whole lot. It would be very nice to be able to have my
>>under-worked local disks take some of the load off the filer.
> 
> 
> How about doing it in the application itself ? Often application has more 
> knowledge about what it needs than the OS. So in a case like the one that 
> you described I would copy the rarely modified file(s) to the local disk 
> and just before accessing them in any way check to see if they were 
> modified. If this is true read-only you don't even need to check this, but

> otherwise you could use some rsync-style transfer to get only the parts 
> that were modified (assuming that new data is not completely different)...

> Modification can be detected from the file attributes, md5sum or something

> else.
> 
> The application level caching is more interesting when the cache size is 
> smaller than the data set. The OS would typically use LRU strategy to 
> make some more room in the cache when needed, but this is not always the 
> best approach - the application is the only one that can have some more 
> information about what data will be needed in the near future.
> 





-------------------------------------------------------
This SF.net email is sponsored by: ValueWeb: 
Dedicated Hosting for just $79/mo with 500 GB of bandwidth! 
No other company gives more support or power for your dedicated server
http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/
_______________________________________________
NFS maillist  -  NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs

^ permalink raw reply	[flat|nested] 15+ messages in thread
* RE: NFSv4 and client caching to local disk?
@ 2003-03-31 21:50 Lever, Charles
  2003-04-01  0:03 ` Jake Gold
  0 siblings, 1 reply; 15+ messages in thread
From: Lever, Charles @ 2003-03-31 21:50 UTC (permalink / raw)
  To: Jake Gold; +Cc: James Pearson, nfs

> I am also extremely interested in something like this.

caching large files on local disk is one of the few
reasonable uses for a disk-based NFS client cache.

> I think the Zeus web server's model for in-memory caching=20
> would be great for NFS clients doing disk caching.
>=20
> Something like this would be great:
>=20
> cache_directory =3D /cache
> 	Directory where cache files are stored
> cache_files
> 	Size of the web server file cache (number of files)
> cache_small_file
> 	Maximum size of a 'small' file (bytes) (system page size)
> cache_large_file
> 	Minimum size of a 'large' file (bytes)
> cache_stat_expire
> 	Time for which the response of a stat() call is cached (seconds)

the NFS protocol specifies certain rules for when attribute
cache entries expire, so this kind of control over your client's
cache isn't possible without breaking the NFS protocol.

> cache_max_bytes
> 	Maximum size to reserve for cached files (bytes) (0 =3D no limit)
> cache_flush_interval
> 	Time after which unaccessed files are flushed from the=20
> cache (seconds)
> cache_cooling_time Integer
> 	any file modified in the last 'n' seconds is not cached
> cache_max_filename_length Integer
> 	filenames greater than this length aren't cached (Zero=20
> is no limit)=20


> I have a FAS940 with a cluster of Linux machines mounting=20
> _read-only_ volumes over NFSv3.
> My situation is the same as James Pearson's....those machines=20
> read large, rarely modified files, where memory caching=20
> doesn't help a whole lot. It would be very nice to be able to=20
> have my under-worked local disks take some of the load off the filer.

have you determined why the filer is "overworked?"  which
version of NFS client do you use?  which protocol (TCP/UDP)?
if UDP, have you looked for signs of IP fragmentation?

the best thing you can do for now is make sure the bandwidth
between your filer and clients is at its maximum.

> Are there currently _any_ client-side NFS caching solutions=20
> (even something that requires some extra work)?
>=20
> Thanks in advance,
> Jake
>=20
> On Mon, 31 Mar 2003 13:33:39 +0100
> James Pearson <james-p@moving-picture.com> wrote:
>=20
> > "Lever, Charles" wrote:
> > >=20
> > > hi james-
> > >=20
> > > > I'm trying to find out more about 'cachefs' type file systems
> > > > that can
> > > > cache NFS data to a client's local disk - I've come across a
> > > > couple of
> > > > references that seem to indicate that this may be=20
> possible with NFSv4.
> > > >
> > > > Does (will?) the Linux NFSv4 client support this feature?
> > >=20
> > > Sun implemented cachefs on Solaris for earlier versions of NFS.
> > > it really has nothing to do with which version of NFS that is
> > > in use.
> >=20
> > I've briefly looked at this on IRIX clients some time ago -=20
> but we don't
> > have many IRIX boxes in use now.
> > =20
> > > there is sporadic interest in a cachefs on Linux, and i know of
> > > at least one generic prototype.  a specific implementation of
> > > client-side disk caching that is available today is contained
> > > in the Linux OpenAFS client (known as the AFS cache manager).
> >=20
> > I have done some limited searching of the net for info and=20
> come across a
> > few attempts with earlier kernels - and I am aware of some the
> > issues/problems associated with doing this.
> > =20
> > > cachefs becomes rather more interesting when used in conjunction
> > > with NFSv4 file delegations -- that makes NFS behave in a fashion
> > > similar to AFS client-side disk caching with callbacks.
> >=20
> > My hopes were raised as the NFSv4 specs suggest that low=20
> level support
> > for client disk caches is available - rather than being a=20
> 'bolt-on' for
> > earlier versions - hence my question.
> > =20
> > > there currently is no explicit plan to implement cachefs by the
> > > team that is working on NFSv4 for Linux.  a disk cache has
> > > rather limited usefulness compared to a memory cache.  what is
> > > your application for it?
> >=20
> > Mainly for reading large files that don't change (much) - i.e.
> > effectively in a read-only mode. The total size of the=20
> required files is
> > greater than the clients memory size - in fact any disk=20
> caching of NFS
> > data doesn't necessarily need to survive a reboot of the client, so
> > caching NFS file system data to swap could be enough for my=20
> needs ...
> >=20
> > James Pearson
> >=20
> >=20
> > -------------------------------------------------------
> > This SF.net email is sponsored by: ValueWeb:=20
> > Dedicated Hosting for just $79/mo with 500 GB of bandwidth!=20
> > No other company gives more support or power for your=20
> dedicated server
> > http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/
> > _______________________________________________
> > NFS maillist  -  NFS@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/nfs
> >=20
>=20


-------------------------------------------------------
This SF.net email is sponsored by: ValueWeb: 
Dedicated Hosting for just $79/mo with 500 GB of bandwidth! 
No other company gives more support or power for your dedicated server
http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/
_______________________________________________
NFS maillist  -  NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs

^ permalink raw reply	[flat|nested] 15+ messages in thread
* Re: NFSv4 and client caching to local disk?
@ 2003-03-31 19:44 Peter Åstrand
  0 siblings, 0 replies; 15+ messages in thread
From: Peter Åstrand @ 2003-03-31 19:44 UTC (permalink / raw)
  To: nfs; +Cc: James Pearson


> I'm trying to find out more about 'cachefs' type file systems that can
> cache NFS data to a client's local disk - I've come across a couple of
> references that seem to indicate that this may be possible with NFSv4.

I recently found out about http://infradead.org/cgi-bin/cvsweb.cgi/afs/, 
which includes a "cachefs" filesystem. It's written by David Howells 
<dhowells@warthog.cambridge.redhat.com>, and was announced as:

"I'm writing a cache filesystem for primarily for caching AFS pages, but
that also can be used for caching other network FS pages (such as NFSv4,
which Jeff Garzik and Trond Myklebust are interested in, I think)."

"Look in the afs/fs/cachefs/ and afs/include/linux/ directories. It's not
complete yet, but does allow me to do some of the functions required, such
as fully journalled block allocation and index creation and entry
allocation."

I haven't tried it, though. 

-- 
/Peter Åstrand <astrand@lysator.liu.se>




-------------------------------------------------------
This SF.net email is sponsored by: ValueWeb: 
Dedicated Hosting for just $79/mo with 500 GB of bandwidth! 
No other company gives more support or power for your dedicated server
http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/
_______________________________________________
NFS maillist  -  NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs

^ permalink raw reply	[flat|nested] 15+ messages in thread
* NFSv4 and client caching to local disk?
@ 2003-03-28 12:22 James Pearson
  2003-03-28 15:01 ` J. Bruce Fields
  0 siblings, 1 reply; 15+ messages in thread
From: James Pearson @ 2003-03-28 12:22 UTC (permalink / raw)
  To: nfs

I'm trying to find out more about 'cachefs' type file systems that can 
cache NFS data to a client's local disk - I've come across a couple of 
references that seem to indicate that this may be possible with NFSv4.

Does (will?) the Linux NFSv4 client support this feature?

Thanks

James Pearson



-------------------------------------------------------
This SF.net email is sponsored by:
The Definitive IT and Networking Event. Be There!
NetWorld+Interop Las Vegas 2003 -- Register today!
http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en
_______________________________________________
NFS maillist  -  NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2003-04-03 16:31 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-03-28 15:16 NFSv4 and client caching to local disk? Lever, Charles
2003-03-31 12:33 ` James Pearson
2003-03-31 18:38   ` Jake Gold
2003-04-01 19:05     ` Bogdan Costescu
2003-04-01 19:56       ` Skottie Miller
2003-04-02 11:27         ` Bogdan Costescu
2003-04-02 11:56           ` James Pearson
2003-04-01 20:56       ` James Pearson
2003-04-01 20:59       ` Jake Gold
  -- strict thread matches above, loose matches on Subject: below --
2003-04-03 16:31 Brashers_Per
2003-03-31 21:50 Lever, Charles
2003-04-01  0:03 ` Jake Gold
2003-03-31 19:44 Peter Åstrand
2003-03-28 12:22 James Pearson
2003-03-28 15:01 ` J. Bruce Fields

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.