zuul/tests/fixtures
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
..
config Executor: Don't start too many jobs at once 2018-02-02 11:36:49 -08:00
gearman Add ssl support to gearman / gearman_server 2017-06-14 10:10:45 -04:00
gerrit Support pagination in simplequery for Gerrit >=2.9 2015-08-31 11:42:15 +02:00
layouts Prune stale branches from mergers 2018-01-23 09:43:26 -08:00
tenants Re-enable test_delayed_repo_init 2017-08-14 23:37:56 -07:00
clonemap.yaml cloner to easily clone dependent repositories 2014-07-29 09:03:59 +00:00
fake_git.sh Add comment explaining gitpython requirement 2017-10-10 11:15:06 -07:00
layout-cloner.yaml Case sensitive label matching 2017-07-27 07:46:35 +02:00
layout-connections-multiple-voters.yaml Add in extra connections tests 2015-12-06 14:48:32 +11:00
layout-disable-at.yaml Case sensitive label matching 2017-07-27 07:46:35 +02:00
layout-live-reconfiguration-functions.yaml Case sensitive label matching 2017-07-27 07:46:35 +02:00
layout-merge-queues.yaml Case sensitive label matching 2017-07-27 07:46:35 +02:00
layout-requirement-vote.yaml Case sensitive label matching 2017-07-27 07:46:35 +02:00
layout-smtp.yaml Case sensitive label matching 2017-07-27 07:46:35 +02:00
layout-success-pattern.yaml Add extra test for bad url patterns 2016-04-23 10:40:12 +10:00
layout.yaml Case sensitive label matching 2017-07-27 07:46:35 +02:00
private.pem Add per-repo public and private keys 2017-03-29 12:43:41 -07:00
public.pem Serve public keys through webapp 2017-03-29 12:44:43 -07:00
test_id_rsa Add SSH Agent Primitives and usage 2017-05-26 09:52:22 -07:00
test_id_rsa.pub Add SSH Agent Primitives and usage 2017-05-26 09:52:22 -07:00
zuul-connections-cgit.conf Make the git web url a template 2017-10-25 17:11:46 -07:00
zuul-connections-gerrit-and-github.conf Remove zuul_url from merger config 2017-07-31 22:28:35 +02:00
zuul-connections-gitweb.conf Make the git web url a template 2017-10-25 17:11:46 -07:00
zuul-connections-merger.conf Remove zuul_url from merger config 2017-07-31 22:28:35 +02:00
zuul-connections-multiple-gerrits.conf Remove zuul_url from merger config 2017-07-31 22:28:35 +02:00
zuul-connections-same-gerrit.conf Remove zuul_url from merger config 2017-07-31 22:28:35 +02:00
zuul-disk-accounting.conf Remove zuul_url from merger config 2017-07-31 22:28:35 +02:00
zuul-executor-hostname.conf Change domain in test fixture to example.com 2017-10-19 17:28:44 +00:00
zuul-gerrit-github.conf Add cross-source tests 2018-01-16 09:37:59 -08:00
zuul-git-driver.conf Git driver 2017-12-15 14:32:40 +01:00
zuul-github-driver.conf Remove zuul_url from merger config 2017-07-31 22:28:35 +02:00
zuul-push-reqs.conf Remove zuul_url from merger config 2017-07-31 22:28:35 +02:00
zuul-sql-driver-bad.conf Remove zuul_url from merger config 2017-07-31 22:28:35 +02:00
zuul-sql-driver-prefix.conf Support table prefix for sql reporter 2017-12-09 12:30:24 +01:00
zuul-sql-driver.conf Remove zuul_url from merger config 2017-07-31 22:28:35 +02:00
zuul.conf Switch statsd config to zuul.conf 2017-10-13 14:04:42 -07:00