weechat-matrix icon indicating copy to clipboard operation
weechat-matrix copied to clipboard

Prefer WAL mode for OLM sqlite store?

Open nwf opened this issue 5 years ago • 1 comments

0bd20cc3336985c158e1a19f0c78fe9e42590160 introduced a sqlite database for OLM key storage. On a test machine, this database was getting updated every minute or so, resulting in creation and removal of a -journal file for sqlite's ACID-ity. This means a largeish burst of filesystem-induced synchronous block-device traffic, which resulted in perceptible lag from within weechat (my machine's backing block devices are not particularly fast and might even be better considered quite slow at random writes like this).

In any case, using the sqlite3 CLI application and asserting pragma journal_mode=WAL; has resulted in a much better state of affairs. Is there reason not to make it the default?

nwf avatar May 26 '20 16:05 nwf

There is no specific reason, I agree that WAL mode should be turned on. Though that database code lives in matrix-nio nowadays.

poljar avatar May 26 '20 19:05 poljar