[oe-commits] [bitbake] 02/08: hashserv: Turn off sqlite synchronous mode
git at git.openembedded.org
git at git.openembedded.org
Sat Jul 27 10:43:46 UTC 2019
This is an automated email from the git hooks/post-receive script.
rpurdie pushed a commit to branch master-next
in repository bitbake.
commit be369a3887ec45b91dad6ec9c3fb90461e60d0a6
Author: Richard Purdie <richard.purdie at linuxfoundation.org>
AuthorDate: Wed Jul 24 14:08:30 2019 +0100
hashserv: Turn off sqlite synchronous mode
We're seeing performance problems with hashserv running on a normal build
system. The cause seems to be the large amounts of file IO that builds involve
blocking writes to the database. Since sqlite blocks on the sync calls, this
causes a significant problem.
Since if we lose power we have bigger problems, run with synchronous=off
to avoid locking and put the jounral into memory to avoid any write issues
there too.
This took writes from 120s down to negligible in my tests, which means
hashserv then responds promptly to requests.
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
lib/hashserv/__init__.py | 2 ++
1 file changed, 2 insertions(+)
diff --git a/lib/hashserv/__init__.py b/lib/hashserv/__init__.py
index 7ec9b64..544bc86 100644
--- a/lib/hashserv/__init__.py
+++ b/lib/hashserv/__init__.py
@@ -21,6 +21,8 @@ class HashEquivalenceServer(BaseHTTPRequestHandler):
def opendb(self):
self.db = sqlite3.connect(self.dbname)
self.db.row_factory = sqlite3.Row
+ self.db.execute("PRAGMA synchronous = OFF;")
+ self.db.execute("PRAGMA journal_mode = MEMORY;")
def do_GET(self):
try:
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list