Coda File System

Re: Question?

From: <jaharkes_at_cs.cmu.edu>
Date: Wed, 19 May 1999 12:36:29 -0400
cytseng_at_CCCA.NCTU.edu.tw said:
| Diego Carvalho wrote:
| > I tried to fetch (by ftp) a 400 MB file. The venus starts to loop
| > on a cache overflow,
|
| hi...
|   I also had this problem with the venus having cache overflow.

Hi,

It is pretty obvious what happens if you know how the kernel and venus 
are interacting. Venus is only told about a few VFS-events, this saves
kernel-user space context switches, which is a must for any user-space
filesystem implementation.

So the kernel tells venus that someone creates a file (CODA_CREAT/OPEN)
In response Venus allocates a filesystem object, but it's still zero
length (no cache space is reclaimed, we don't know how big the file is 
going to be).

Then the user application can read and write all it wants, until it 
closes the file. The kernel informs venus of this event (CODA_CLOSE).

Now venus does an fstat on the container file, and readjusts the cache 
usage, and starts throwing things out if we went over the cache-size
limit. And because the 400MB file is very large (and expensive to
refetch) it is less likely to be thrown out!! So Venus tries to shrink
the cache a couple of times, but fails to get the cache usage below the 
limit, so it will print a Cache Overflow message, until the object has
aged enough to be purged.

To avoid this, we will need to modify the kernel-Venus protocol so that
the kernel asks venus for permission to enlarge a file, that way Venus
can make sure that we do not overflow the cache, and that quotas are
honoured.

Jan
Received on 1999-05-19 12:42:30