Add memory limits and parallelism limits to builds.

Also made a lot of internal variables into flags so they can be easily
tuned.

The memory limits were simple enough, since they
can be passed directly to docker.

The parralelism limits required implementing a jobqueue.  The jobqueue
allows you to start a number of dedicated workers, create jobs, and add
jobs to the queue.  Jobs results are returned on a channel.

We looked into cpu limits with --cpu-shares, but those numbers are
relative to other docker instances, and don't represent a shares of the
total cpu, so can't be used to impose cpu limits on the build instances.

Change-Id: Ie381992a84be835974d2f9f65686b87b72d40c65
7 files changed
tree: fb3399cda006e95b5bc1d093fb82c2a421aafd6d
  1. client/
  2. go/
  3. pgbundle/
  4. .gitignore
  5. AUTHORS
  6. CONTRIBUTORS
  7. LICENSE
  8. PATENTS
  9. VERSION