(Illustration by Gaich Muramatsu)
On Wed, 19 May 1999 jaharkes_at_cs.cmu.edu wrote: > > 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. I would suggest that any files over some threshold.. lets say 1/3 the cache size would be accessed either completely over the network, or by caching large blocks of the file instead of the whole file (4 MB chunks, maybe?). I suspect this would require a decent amount of work to support block caching, however. -------------------------------------------------------------------------- | Troy Benjegerdes | troy_at_microux.com | hozer_at_drgw.net | | Unix is user friendly... You just have to be friendly to it first. | | This message composed with 100% free software. http://www.gnu.org | --------------------------------------------------------------------------Received on 1999-05-20 12:07:52