summaryrefslogtreecommitdiffstats
path: root/bitbake/lib
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2019-07-24 14:08:30 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-08-06 11:21:31 +0100
commitf9f308250a2d77afbf3c5db6eed889bfdab99948 (patch)
tree00377752d6e268115d5bf5d6ce5f0cb41e8b72f1 /bitbake/lib
parentca04aaf7b51e3ee2bb04da970d5f20f2c9982cb8 (diff)
downloadpoky-f9f308250a2d77afbf3c5db6eed889bfdab99948.tar.gz
bitbake: 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. (Bitbake rev: 7ae56a4d4fcf66e1da1581c70f75e30bfdf3ed83) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib')
-rw-r--r--bitbake/lib/hashserv/__init__.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/bitbake/lib/hashserv/__init__.py b/bitbake/lib/hashserv/__init__.py
index 7ec9b64419..544bc86b16 100644
--- a/bitbake/lib/hashserv/__init__.py
+++ b/bitbake/lib/hashserv/__init__.py
@@ -21,6 +21,8 @@ class HashEquivalenceServer(BaseHTTPRequestHandler):
21 def opendb(self): 21 def opendb(self):
22 self.db = sqlite3.connect(self.dbname) 22 self.db = sqlite3.connect(self.dbname)
23 self.db.row_factory = sqlite3.Row 23 self.db.row_factory = sqlite3.Row
24 self.db.execute("PRAGMA synchronous = OFF;")
25 self.db.execute("PRAGMA journal_mode = MEMORY;")
24 26
25 def do_GET(self): 27 def do_GET(self):
26 try: 28 try: