As stated in previous blog
articles, the default SQlite3 write speed is quite slow, when
running on a normal hard drive. By default, the engine will pause after issuing
a OS-level write command. This guarantees that the data is written to the disk,
and features the ACID properties of the database engine.
ACID is an acronym for "Atomicity Consistency Isolation
Durability" properties, which guarantee that database transactions are
processed reliably: for instance, in case of a power loss or hardware failure,
the data will be saved on disk in a consistent way, with no potential loss of
In SQLite3, ACID is implemented by two means at file level:
- Synchronous writing: it means that the engine will wait for any
written content to be flushed to disk before processing the next request;
- File locking: it means that the database file is locked for
exclusive use during writing, allowing several processes to access the same
database file concurrently.
Changing these default settings can ensure much better writing
We just added direct
File locking tuning.
It appears that defining exclusive access mode is able to increase the
performance a lot, in both reading and writing speed.
Here are some new benchmarks and data, extracted from the updated SAD