summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorJoshua Watt <jpewhacker@gmail.com>2018-12-03 21:42:32 -0600
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-12-07 12:38:58 +0000
commit09b4de78f2ae6fce4d3ef1992d185ec2aa12f475 (patch)
tree5a303f38750f3ea4d29117e238941fa58a145cdf /bitbake
parent549eccc0db48507dfda25aec1d8b0b5b8e1b3d16 (diff)
downloadpoky-09b4de78f2ae6fce4d3ef1992d185ec2aa12f475.tar.gz
bitbake: persist_data: Enable Write Ahead Log
Enabling the write ahead log improves database reliability, speeds up writes (since they mostly happen sequentially), and speeds up readers (since they are no longer blocked by most write operations). The persistent database is very read heavy, so the auto-checkpoint size is reduced from the default (usually 1000) to 100 so that reads remain fast. [YOCTO #13030] (Bitbake rev: 79100fa67539f9654af9bf6d3e6842eb5c12e989) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bb/persist_data.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/bitbake/lib/bb/persist_data.py b/bitbake/lib/bb/persist_data.py
index 2bc3e766a9..1492792090 100644
--- a/bitbake/lib/bb/persist_data.py
+++ b/bitbake/lib/bb/persist_data.py
@@ -279,6 +279,11 @@ class PersistData(object):
279def connect(database): 279def connect(database):
280 connection = sqlite3.connect(database, timeout=5) 280 connection = sqlite3.connect(database, timeout=5)
281 connection.execute("pragma synchronous = off;") 281 connection.execute("pragma synchronous = off;")
282 # Enable WAL and keep the autocheckpoint length small (the default is
283 # usually 1000). Persistent caches are usually read-mostly, so keeping
284 # this short will keep readers running quickly
285 connection.execute("pragma journal_mode = WAL;")
286 connection.execute("pragma wal_autocheckpoint = 100;")
282 connection.text_factory = str 287 connection.text_factory = str
283 return connection 288 return connection
284 289