>From what I understand;
- Read-Only data
- Data doesn't change frequently
- Central repository for data
- Network latency causing issues

My two cents on this is to keep a database revision ID kicking around and
do a SQLite backup of the remote data to a local storage medium.  At
application launch, check the local version of the database, then check the
NFS version, and if there is a mismatch or a local copy doesn't exist, have
the application ask (Or force if no local copy exists) to copy the data
from remote to local, then read data from the local source.  This will be a
bit of a PITA if you're talking gigabytes of storage on a saturated 100mbit
network or if drive space is limited.  (I love my quiet GigE network)

If you ever make a change to the database of relevance, update the database
ID on the NFS version and any new client connections will do the version
validation and (ask to...) pull the required changes when required.

I may love my GigE network, but just two days ago I turned off a network
switch accidentally and lost all communication to my server
unintentionally.  Stupid things like that could put a halt on your
production environment.  If you keep things local, the network isn't going
to matter (Unless your app also talks to other network
appliances/devices/etc via the affected network) and the gain is that
you're also going to increase the speed of your app.

Depending on database size and memory amount, you could also increase the
speed of database transactions by not only copying the data from the remote
storage to a local drive, but go a step further and do another backup from
local drive to RAM by doing a backup to [ :memory: ] and then access what
is in memory.  The downside of that, again depending on size of the
database, is not only memory constraint but initial load time of the
application considering NAS->Local->Memory.


On Sat, Apr 11, 2015 at 9:30 AM, Peng Yu <pengyu.ut at gmail.com> wrote:

> Hi,
>
> I know that sqlite3 is not recommended to be used on NFS. But I only
> use sqlite3 for read only (the only time that I write is to load the
> initial data to the data base). With this restriction, NFS should be
> fine as the storage since no file locking is needed.
>
> I remember that sqlite3 on NFS is significantly slower than on a local
> disk (a few times slower when I tested a few years ago).
>
> 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). Thanks.
>
> --
> Regards,
> Peng
> _______________________________________________
> sqlite-users mailing list
> sqlite-users at mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>

Reply via email to