[AVFS] Updated extfs and a minor problem with the cache
Ralf Hoffmann <[email protected]> Thu, 16 Jun 2005 22:19:12 +0200
| Newsgroups | gmane.comp.file-systems.avfs.user |
|---|---|
| Message-ID | <[email protected]> |
Hi, I encountered a performance problem with the cache. When copying a file from a remote site (ftp or ssh), it takes much longer when the file is larger than the cache limit (by default 100MB). I found out that the file is transfered twice. First the file is read and stored in the cache. After completion av_cacheobj_setsize() is called which will remove the file again because it's larger than the cache limit. So when a program does the last read() call to expect 0 bytes (file end), the whole file is transfered again. I changed the behaviour of deleting an entry when the cache is full. cache_checkspace() is now not called when setting the size of an entry with av_cacheobj_setsize() but at the beginning of av_cacheobj_new() so the tmp file is kept until a new cache file is requested (although the file is larger than the cache limit, the file is on the disc already so why remove it). I don't see any problem with this minor change and it works fine but you know the cache code better so if this breaks something we should thing about another solution. With the last commit I also updated the extfs. I wasn't able to test everything single extension but the few I tested work fine. There is also some small changes to the automake files so "make distcheck" also works. What do you think about releasing a new version? Best Regards, Ralf Hoffmann -- Homepage: http://www.boomerangsworld.de E-Mail: Ralf Hoffmann <[email protected]> english or german ------------------------------------------------------- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click