diff options
author | Joshua Watt <jpewhacker@gmail.com> | 2019-09-17 08:37:11 -0500 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-09-18 17:52:01 +0100 |
commit | 20f032338ff3b4b25f2cbb7f975b5fd1c105004d (patch) | |
tree | 84c1a4693fdbaac0823e99d70ed7c814b890244c /bitbake/lib/bb/runqueue.py | |
parent | 34923e4f772fc57c29421741d2f622eb4009961c (diff) | |
download | poky-20f032338ff3b4b25f2cbb7f975b5fd1c105004d.tar.gz |
bitbake: bitbake: Rework hash equivalence
Reworks the hash equivalence server to address performance issues that
were encountered with the REST mechanism used previously, particularly
during the heavy request load encountered during signature generation.
Notable changes are:
1) The server protocol is no longer HTTP based. Instead, it uses a
simpler JSON over a streaming protocol link. This protocol has much
lower overhead than HTTP since it eliminates the HTTP headers.
2) The hash equivalence server can either bind to a TCP port, or a Unix
domain socket. Unix domain sockets are more efficient for local
communication, and so are preferred if the user enables hash
equivalence only for the local build. The arguments to the
'bitbake-hashserve' command have been updated accordingly.
3) The value to which BB_HASHSERVE should be set to enable a local hash
equivalence server is changed to "auto" instead of "localhost:0". The
latter didn't make sense when the local server was using a Unix
domain socket.
4) Clients are expected to keep a persistent connection to the server
instead of creating a new connection each time a request is made for
optimal performance.
5) Most of the client logic has been moved to the hashserve module in
bitbake. This makes it easier to share the client code.
6) A new bitbake command has been added called 'bitbake-hashclient'.
This command can be used to query a hash equivalence server, including
fetching the statistics and running a performance stress test.
7) The table indexes in the SQLite database have been updated to
optimize hash lookups. This change is backward compatible, as the
database will delete the old indexes first if they exist.
8) The server has been reworked to use python async to maximize
performance with persistently connected clients. This requires Python
3.5 or later.
(Bitbake rev: 2124eec3a5830afe8e07ffb6f2a0df6a417ac973)
Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/runqueue.py')
-rw-r--r-- | bitbake/lib/bb/runqueue.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py index 45bfec8c37..314a30908b 100644 --- a/bitbake/lib/bb/runqueue.py +++ b/bitbake/lib/bb/runqueue.py | |||
@@ -1260,7 +1260,7 @@ class RunQueue: | |||
1260 | "buildname" : self.cfgData.getVar("BUILDNAME"), | 1260 | "buildname" : self.cfgData.getVar("BUILDNAME"), |
1261 | "date" : self.cfgData.getVar("DATE"), | 1261 | "date" : self.cfgData.getVar("DATE"), |
1262 | "time" : self.cfgData.getVar("TIME"), | 1262 | "time" : self.cfgData.getVar("TIME"), |
1263 | "hashservport" : self.cooker.hashservport, | 1263 | "hashservaddr" : self.cooker.hashservaddr, |
1264 | } | 1264 | } |
1265 | 1265 | ||
1266 | worker.stdin.write(b"<cookerconfig>" + pickle.dumps(self.cooker.configuration) + b"</cookerconfig>") | 1266 | worker.stdin.write(b"<cookerconfig>" + pickle.dumps(self.cooker.configuration) + b"</cookerconfig>") |
@@ -2174,7 +2174,7 @@ class RunQueueExecute: | |||
2174 | ret.add(dep) | 2174 | ret.add(dep) |
2175 | return ret | 2175 | return ret |
2176 | 2176 | ||
2177 | # We filter out multiconfig dependencies from taskdepdata we pass to the tasks | 2177 | # We filter out multiconfig dependencies from taskdepdata we pass to the tasks |
2178 | # as most code can't handle them | 2178 | # as most code can't handle them |
2179 | def build_taskdepdata(self, task): | 2179 | def build_taskdepdata(self, task): |
2180 | taskdepdata = {} | 2180 | taskdepdata = {} |