SQLite Forum

SQLite with NFS + cachefilesd
From what I understand after searching for cachefilesd, it caches reads only, and I believe it is caching entire files. There is a lot of overhead in opening/reading/closing many small files, so a cache is great at helping speed up those sorts of patterns by storing the file in the local cache. If it is checking for files to be modified, I fear that it will wind up copying the entire database file back down every time it changes (which will be frequently, I suspect).

Alternatively, the problem could be how cachefiled caches randomly accessed vs sequentially accessed files.

As for NFSv4+, SQLite can't really document that more than it has already, as the problem with remote file systems haven't necessarily been the specification of the file system, it has been the implementation of the file system. If anyone deviates from the published interfaces, then the documentation doesn't apply.

I think your desire to avoid having to set up and maintain an actual database server is understandable, but by trying to use SQLite over NFS, you are simply trading one headache (having to maintain the DB server) for another (whether or not NFS whatever version and implementation honors all file system semantics so as to be indistinguishable from a local file system).

The benefit to the database server is "it will either work or it won't" ... if the server is accessible, it will work (assuming the software itself is defect free and configured properly). Otherwise your application will know "I cannot communicate with the DB server, something is wrong, sound the alarm."

Compare that to the alternative of NFS maybe working but maybe not. SQLite asked for data. NFS provided it. SQLite attempted to lock. NFS said it did. SQLite feels it is safe to commit pages to the database. But NFS lied, so now the database is corrupt in some way that might or might not manifest itself at some future point in time.