zuul/tests/fixtures/config
James E. Blair df37ad2ce7 Executor: Don't start too many jobs at once
The metrics that we use to govern load on the executors are all
trailing indicators.  The executors are capable of accepting a
large number of jobs in a batch and then, only after they begin
to run, will the load indicators increase.  To avoid the thundering
herd problem, reduce the rate at which we accept jobs past a certain
point.

That point is twice the number of jobs as the target load average.
In practice that seems to be a fairly conservative but reasonable
number of jobs for the executor to run, so, to facilitate a quick
start, allow the executor to start up to that number all at once.

Once the number of jobs running is beyond that number, subsequent
jobs will only be accepted one at a time, after each one completes
its startup phase (cloning repos, establishing ansible connections),
which is to say, at the point where the job begins running its first
pre-playbook.

We will also wait until the next regular interval of the governor
to accept the next job.  That's currently 30 seconds, but to make
the system a bit more responsive, it's lowered to 10 seconds in this
change.

To summarize: after a bunch[1] of jobs are running, after each new
job, we wait until that job has started running playbooks, plus up
to an additional 10 seconds, before accepting a new job.

This is implemented by adding a 'starting jobs' metric to the governor
so that we register or de-register the execute function based on
whether too many jobs are in the startup phase.  We add a forced
call to the governor routine after each job starts so that we can
unregister if necessary before picking up the next job, and wrap that
routine in a lock since it is now called from multiple threads and
its logic may not be entirely thread-safe.

Also, add tests for all three inputs to manageLoad.

[1] 2*target load average

Change-Id: I066bc539e70eb475ca2b871fb90644264d8d5bf4
2018-02-02 11:36:49 -08:00
..
allowed-projects Don't override allowed-projects 2018-01-26 14:28:46 -08:00
ansible Update playbook paths with extension 2017-12-05 14:25:07 +11:00
base-jobs Update test fixtures to use explicit run 2017-10-26 15:59:41 -07:00
branch-mismatch Use override-checkout to select jobs 2018-01-24 13:06:04 -08:00
branch-negative Fix complex branch matchers in project configs 2017-12-01 15:25:13 -08:00
branch-tag Fix implied branch matchers and tags 2017-12-01 15:54:24 -08:00
branch-templates Combine branch templates and pipeline branch matchers 2017-11-28 14:07:14 -08:00
branch-variants Update playbook paths with extension 2017-12-05 14:25:07 +11:00
broken Case sensitive label matching 2017-07-27 07:46:35 +02:00
central-jobs Add multi-branch support for project-templates 2017-10-27 13:41:25 -07:00
conflict-config Require a base job 2017-08-07 14:52:37 -07:00
cross-source Add cross-source tests 2018-01-16 09:37:59 -08:00
data-return Update test fixtures to use explicit run 2017-10-26 15:59:41 -07:00
dependency-graph Update test fixtures to use explicit run 2017-10-26 15:59:41 -07:00
disk-accountant Update test fixtures to use explicit run 2017-10-26 15:59:41 -07:00
duplicate-pipeline Update test fixtures to use explicit run 2017-10-26 15:59:41 -07:00
final Update test fixtures to use explicit run 2017-10-26 15:59:41 -07:00
git-driver Git driver 2017-12-15 14:32:40 +01:00
governor Executor: Don't start too many jobs at once 2018-02-02 11:36:49 -08:00
implicit-project Add implicit project name matching 2017-12-22 10:09:28 +01:00
implicit-roles Update test fixtures to use explicit run 2017-10-26 15:59:41 -07:00
in-repo Update test fixtures to use explicit run 2017-10-26 15:59:41 -07:00
in-repo-join Update test fixtures to use explicit run 2017-10-26 15:59:41 -07:00
inventory Add specific setup inventory 2017-12-28 18:13:44 +01:00
job-output Update playbook paths with extension 2017-12-05 14:25:07 +11:00
merge-modes/git/common-config/playbooks Merge "Add playbooks for all test jobs" into feature/zuulv3 2017-02-06 16:45:58 +00:00
merges Update test fixtures to use explicit run 2017-10-26 15:59:41 -07:00
multi-driver Update test fixtures to use explicit run 2017-10-26 15:59:41 -07:00
multi-tenant Update test fixtures to use explicit run 2017-10-26 15:59:41 -07:00
multi-tenant-semaphore Update test fixtures to use explicit run 2017-10-26 15:59:41 -07:00
nodesets Handle nodesets in branches 2018-01-18 13:38:13 -08:00
openstack Update test fixtures to use explicit run 2017-10-26 15:59:41 -07:00
post-playbook Update playbook paths with extension 2017-12-05 14:25:07 +11:00
pragma Add pragma directive 2017-10-26 14:28:03 -07:00
pragma-multibranch Add implied-branches pragma directive 2017-12-13 16:06:34 -08:00
pre-playbook Update playbook paths with extension 2017-12-05 14:25:07 +11:00
protected Add support for protected jobs 2017-12-15 19:31:02 +01:00
push-reqs Update test fixtures to use explicit run 2017-10-26 15:59:41 -07:00
requirements Update test fixtures to use explicit run 2017-10-26 15:59:41 -07:00
roles Update test fixtures to use explicit run 2017-10-26 15:59:41 -07:00
secret-inheritance Update test fixtures to use explicit run 2017-10-26 15:59:41 -07:00
secret-leaks Update test fixtures to use explicit run 2017-10-26 15:59:41 -07:00
secrets Handle secrets in branches 2018-01-18 13:38:02 -08:00
semaphore Update test fixtures to use explicit run 2017-10-26 15:59:41 -07:00
semaphore-branches Normalize semaphore branch handling 2018-01-18 14:53:15 -08:00
shadow Update test fixtures to use explicit run 2017-10-26 15:59:41 -07:00
single-tenant Update test fixtures to use explicit run 2017-10-26 15:59:41 -07:00
split-config Update test fixtures to use explicit run 2017-10-26 15:59:41 -07:00
sql-driver Update test fixtures to use explicit run 2017-10-26 15:59:41 -07:00
streamer Update test fixtures to use explicit run 2017-10-26 15:59:41 -07:00
success-url Update test fixtures to use explicit run 2017-10-26 15:59:41 -07:00
templated-project Update test fixtures to use explicit run 2017-10-26 15:59:41 -07:00
tenant-parser Fix mixed canonical/non-canonical project merge 2017-11-29 20:34:06 +01:00
unprotected-branches Update test fixtures to use explicit run 2017-10-26 15:59:41 -07:00
zuul-connections-multiple-gerrits Update test fixtures to use explicit run 2017-10-26 15:59:41 -07:00
zuul-connections-same-gerrit Update test fixtures to use explicit run 2017-10-26 15:59:41 -07:00
zuultrigger Merge "Re-enable test_zuul_trigger_project_change_merged" into feature/zuulv3 2017-11-29 17:57:32 +00:00