On Nov 8, 2008, at 11:06 AM, Joshua Paine wrote: > Joshua Paine wrote: >> Some web hosts, like DreamHost and Mosso, provide only NFS-based >> storage. I would very much like to know if it's possible to run >> SQLite >> safely on these (Mosso, actually), so I need some way of testing >> if the >> NFS implementation is adequate. > > A quickie port of my app to MySQL only took ~30 min, so I worried > about > that a bit more than necessary. But I found to my surprise that for my > smallish data set without much attempt at optimization either way, > MySQL-over-internal-network doesn't seem to have any substantial speed > advantage over SQLite-over-NFS on Mosso. SQLite may even be faster. > > So now that I know performance is a toss-up, it would be really > nice to > know if I'm safe using SQLite on NFS. Anyone have any thoughts? What > kind of race conditions should I be simulating? Is it enough, do you > think, to make a simple page that runs a few inserts and try to > load it > with N clients simultaneously a few [dozen? hundred? thousand?] times? >
Simultaneous access over NFS will *not* work. Lack of Unix file semantics, caching effects, and locking issues prevent it. Lockd cannot be depended on in a busy environment. Access will have to serialized somehow. Even with serialized access there are no guarantees, since behavior between NFS storage implementations varies. Play around with it, and see how it goes. Find out if they are using NFSv2 or v3, as v2 has some nasty races with exclusive creates. Peter _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users