-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 04/11/2015 06:30 AM, Peng Yu wrote: > I am wondering for my limited usage scenario, is it possible to > make sqlite3 on NFS as fast as sqlite3 on local storage (such as > disable file locking).
The latency is what is getting you. SQLite uses synchronous/blocking I/O. What version of NFS are you using? NFSv4 has features that significantly reduce the effects of latency. If you want to maximize performance then I recommend writing your own VFS, which is very easy for read only. That will let you do read ahead and caching. Heck you could just copy the database locally and use that. One technique I used in the past (for WAN optimisers) is to record the access patterns for a newly opened file, and then on subsequent opens pre-read that same data. This was very effective across many file formats, but SQLite was not tested/relevant. It also meant not having to understand the actual file formats. Roger -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlUpwCQACgkQmOOfHg372QSt1gCgzORbl2o18gKfkzMx8qph557L AQUAn0Rcog3QZbwWeAck8tFlira84xZU =dgFW -----END PGP SIGNATURE-----