From c35cecebc6a407bac14a9f1b8dff5dbc85130f77 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Wed, 5 Nov 2014 16:58:13 +0000 Subject: bitbake: prserv: Use WAL mode Ideally, we want the PR service to have minimal influence from queued disk IO. sqlite tends to be paranoid about data loss and locks/fsync calls. There is a "WAL mode" which changes the journalling mechanism and would appear much better suited to our use case. This patch therefore switches the database to use WAL mode. With this change, write overhead appears significantly reduced. (Bitbake rev: 90b05e79764b684b20ce8454e89f05763b02ac97) Signed-off-by: Richard Purdie --- bitbake/lib/prserv/db.py | 1 + 1 file changed, 1 insertion(+) (limited to 'bitbake/lib') diff --git a/bitbake/lib/prserv/db.py b/bitbake/lib/prserv/db.py index 3bdc04692e..9d6d11526a 100644 --- a/bitbake/lib/prserv/db.py +++ b/bitbake/lib/prserv/db.py @@ -235,6 +235,7 @@ class PRData(object): self.connection=sqlite3.connect(self.filename, isolation_level="EXCLUSIVE", check_same_thread = False) self.connection.row_factory=sqlite3.Row self.connection.execute("pragma synchronous = off;") + self.connection.execute("PRAGMA journal_mode = WAL;") self._tables={} def __del__(self): -- cgit v1.2.3-54-g00ecf