[OpenAFS] Re: limit amount of uncommitted cache manager data?

Matthew Andrews matt@slackers.net
Tue, 06 Nov 2007 09:18:47 -0800


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Derrick J Brashear wrote:
> On Mon, 24 Sep 2007, Adam Megacz wrote:
> 
>>
>> "Derrick Brashear" <shadow@gmail.com> writes:
>>> it would involve a semantic change but we could start flushing
>>> changes in
>>> the background before fsync. there are of course potential issues.
>>
>> Wouldn't it be the same semantics as if the client cache were rather
>> small?
> 
> largely. but this forces the change for everyone.
> 
>> I can get the app to fsync(), though, so it looks like I'll go with that.
> 
> good.

Hi,

I looked at this a long time ago, and IIRC the "cache full" behavior was
a synchronous one. I.E. cache data was pushed to the server during the
write calls, and only enough data was written so that the write in
question could succeed. Ideally this activity would occur as a
background task starting when the cache hit some high watermark of dirty
data, and run until some low watermark had been reached.

There is a thread in the cachemanager which handles asynchronous writes
when the cachemanager is configured to write after close(I don't
remember the option offhand) One of the issues with operating in that
mode is that you can have the write fail after the file is closed if for
example your tokens expire before all of the dirty data is flushed, but
I don't think that would be an issue if you did the background writes
while the file was still open, and required everything to be written
before the close succeeded.

I'm inclined to agree with Adam. I'm not sure this is really a change of
semantics for the client. The client does not guarantee that changes
will not be sent to the server until a close() or fsync() is called, but
rather only that those calls will guarantee that all previously written
data is sent to the server.

Implementing this is one of the things that's been sitting on my rainy
day list for several years now, but somehow there don't seem to be as
many rainy days here in California as I used to get back in Pittsburgh
;-) Adam, if you're interested in working on this, feel free to send me
an e-mail off list, and we can talk about it more.

- -Matt



> _______________________________________________
> OpenAFS-info mailing list
> OpenAFS-info@openafs.org
> https://lists.openafs.org/mailman/listinfo/openafs-info
> 
> 

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iD8DBQFHMKH3pLF3UzlwZVgRAlhTAJ0dHA+HEU/gTmWoNOLUEhrlAXJE/gCeKREF
bn+v2Kpuj6ZjcKSkw/1q8Ps=
=C6sT
-----END PGP SIGNATURE-----