Re: Caching and callbacks

New Message Reply About this list Date view Thread view Subject view Author view Attachment view

From: Dave Hitz (hitz@netapp.com)
Date: 02/25/99-07:32:47 AM Z


From: Dave Hitz <hitz@netapp.com>
Message-Id: <199902251332.FAA04798@jam.corp.netapp.com>
Subject: Re: Caching and callbacks
Date: Thu, 25 Feb 1999 05:32:47 -0800 (PST)

> Fascinating ... cached locks.
...
> So op-locks are truly a cache (everything) mechanism and not a locking
> mechanism. The database example requires either an exclusive share on
> the whole file containing the database, or it requires the use of
> Windows mandatory byte range locks. Otherwise, when the second client
> goes to open the file, the op-lock is broken, and if the application
> has no mandatory byte-range lock on the file, file corruption will
> ensue.

Yep -- this matches my understanding.

Op-locks are not a locking mechanism, but they *allow* very efficient
locking for exclusive access situations with repeated opens and
closes.  Once the client OS gets the op-lock, it can allow an
application to do multiple open-lock-write-unlock-close sequences
without having to contact the server at all.  If it wants to, the
client OS can flush data on close(), to provide more safety for
crashes, but it still doesn't have to send any GETATTRs over the wire
to ensure close-to-open consistency, and it doesn't have to send locks
over the wire at all.

As an NFS/UNIX bigot, I was very impressed with op-locks when I learned
about them from the NT/CIFS folks here.  They allow very high
performance for single-client access, and that seems to be, by far, the
most common case.

> Assuming I'm correct in my understanding, we would next need to analyze the
> utility of the op-lock model on the Internet. 
...
> What about the
> scenario where tens of thousands of clients access the same file? Doesn't
> appear op-locks are useful here, and and existing NFS V3
> close-to-open/GETATTR model scales better.

My understanding is that op-locks are really a single user
optimization.  (I can't remember if you can have multiple "read
op-locks".)

Op-locks don't preclude the close-to-open/GETATTR model.  You can have
op-locks to allow high performance for single client access, but if the
client OS does not have an op-lock, either because it wasn't granted
one or because it doesn't support them, then the alternative is to use
locks that go to the server and GETATTR-on-open to support
close-to-open cache consistency.

So the real question is, Would the Internet be used only for shared
files, or would it sometimes be used for exclusive access?

Let me tell you my personal fantasy.  (One that I'm willing to share, I
mean.)  I'd like to buy disk space as a service from my internet
provider.  My home PC would be data-less, so that I never had to do
back-ups or worry about transfering data when I buy a new PC.  Plus I
could access all my personal files from work, or when I'm traveling.
But it would have a very large disk cache, and op-locks on everything I
use, so that performance would be at local disk speeds.

I don't know when this will be feasible, but given the speed of light,
I doubt it will ever be feasible without op-locks, or something like
them that can endure across multiple open-close's at the client.

Dave


New Message Reply About this list Date view Thread view Subject view Author view Attachment view

This archive was generated by hypermail 2.1.2 : 03/04/05-01:46:45 AM Z CST