summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2020-09-28 20:01:57 +0530
committerNirbheek Chauhan <nirbheek@centricular.com>2020-09-30 20:28:22 +0530
commitf111503d20ae56254222b88eca1656ec2ddf1e22 (patch)
tree550bdc11b41d5b2ced89e7b04d279c5b93013197
parentfec066af258f272c98a0b304a5caf111336e4582 (diff)
cerbero: Allocate two jobs for fetching when we have lots of jobs
Same as fetch-{package,bootstrap} and it's good to assume that we will be bottlenecked on network I/O or single-threaded CPU in this case. Part-of: <https://gitlab.freedesktop.org/gstreamer/cerbero/-/merge_requests/616>
-rw-r--r--cerbero/build/oven.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/cerbero/build/oven.py b/cerbero/build/oven.py
index 0db9e33c..f1d9c5af 100644
--- a/cerbero/build/oven.py
+++ b/cerbero/build/oven.py
@@ -352,7 +352,10 @@ class Oven (object):
job_allocation[BuildSteps.EXTRACT[1]] = 1
queues[BuildSteps.EXTRACT[1]] = asyncio.PriorityQueue(loop=loop)
if self.jobs > 9:
- job_allocation[BuildSteps.FETCH[1]] = 1
+ # Two jobs is the same allocation as fetch-package/bootstrap, which
+ # is a good idea to avoid getting bottlenecked if one of the
+ # download mirrors is slow.
+ job_allocation[BuildSteps.FETCH[1]] = 2
queues[BuildSteps.FETCH[1]] = asyncio.PriorityQueue(loop=loop)
# async locks used to synchronize step execution