On 12/03/2014 12:01 p.m., Nico Williams wrote:
ZFS recordsize
Hi Nico,
I have one (or two) last question(s)...
All I need to do is prevent a single process ('process A') from being
time bound by making fsync() calls that clash with fsync() calls from
other processes using other files in the same dataset. I don't care if
the other processes occasionally block but process A has to be responsive.
I can accomplish this goal by preventing process A from making any fsync
calls and I can do this by setting pragma synchronous = off; I realise
this is inviting data corruption in most circumstances, however 'process
A' is the exclusive user of it's sqlite database and it's on ZFS, so my
questions are:
- with pragma synchronous = off; and assuming exclusive use of the
database, can I rely on ZFS atomic write to ensure data integrity?
- does pragma locking_mode = exclusive; ensure this exclusive use
assumption is always true? (I'm ~assuming~ it does :)
________________
This would be the Sword of Damocles solution to my problem so I'm hoping
it can be made risk free. Preliminary testing shows me it solves the
original problem.
Option B for me is to experiment with the impact of ZFS recordsize,
SQLite pagesize and SQLITE_IOCAP_ATOMIC on SQLite's use of fsync... I've
looked at the source, but it's not easy to infer much from it without
being sure of the context. Messing with these record sizes isn't an
ideal option for me and I can't easily add ZIL/SLOG.
If you have any ideas on this, could you please let me know. Also, if
you have any example code demonstrating use of sqlite3_io_methods and
xDeviceCharacteristics() it would be much appreciated. I'd like to
verify the actual device characteristics that SQLite is lifting from my
dataset.
Hope this isn't asking too much.
Cheers,
Jono.
--
------------------------------
This email, including any attachments, is only for the intended recipient.
It is subject to copyright, is confidential and may be the subject of legal
or other privilege, none of which is waived or lost by reason of this
transmission.
If you are not an intended recipient, you may not use, disseminate,
distribute or reproduce such email, any attachments, or any part thereof.
If you have received a message in error, please notify the sender
immediately and erase all copies of the message and any attachments.
Unfortunately, we cannot warrant that the email has not been altered or
corrupted during transmission nor can we guarantee that any email or any
attachments are free from computer viruses or other conditions which may
damage or interfere with recipient data, hardware or software. The
recipient relies upon its own procedures and assumes all risk of use and of
opening any attachments.
------------------------------
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users